⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmstorehouseproductman.frm

📁 企业ERP系统 采用VB+SQL2000实现。 有客户合约
💻 FRM
📖 第 1 页 / 共 3 页
字号:
               Height          =   255
               Left            =   1020
               TabIndex        =   37
               Top             =   2700
               Width           =   495
            End
            Begin VB.Label Label13 
               BackColor       =   &H80000005&
               Caption         =   "經"
               Height          =   255
               Left            =   6120
               TabIndex        =   33
               Top             =   2160
               Width           =   495
            End
            Begin VB.Label Label11 
               BackColor       =   &H80000005&
               Caption         =   "经動"
               Height          =   255
               Left            =   1020
               TabIndex        =   29
               Top             =   2220
               Width           =   855
            End
            Begin VB.Label Label5 
               BackColor       =   &H80000005&
               Caption         =   "成份"
               Height          =   255
               Left            =   1020
               TabIndex        =   28
               Top             =   1200
               Width           =   1035
            End
            Begin VB.Label Label4 
               BackColor       =   &H80000005&
               Caption         =   "坑數"
               Height          =   255
               Index           =   0
               Left            =   6120
               TabIndex        =   27
               Top             =   660
               Width           =   1035
            End
            Begin VB.Label Label10 
               BackColor       =   &H80000005&
               Caption         =   "至"
               Height          =   195
               Index           =   3
               Left            =   6120
               TabIndex        =   19
               Top             =   3720
               Width           =   615
            End
            Begin VB.Label Label9 
               BackColor       =   &H80000005&
               Caption         =   "更新日期"
               Height          =   255
               Index           =   1
               Left            =   1020
               TabIndex        =   18
               Top             =   3720
               Width           =   1035
            End
            Begin VB.Label Label1 
               BackColor       =   &H80000005&
               Caption         =   "布號"
               Height          =   255
               Index           =   4
               Left            =   1020
               TabIndex        =   17
               Top             =   240
               Width           =   1035
            End
            Begin VB.Label Label2 
               BackColor       =   &H80000005&
               Caption         =   "布名"
               Height          =   255
               Index           =   2
               Left            =   6120
               TabIndex        =   16
               Top             =   240
               Width           =   1035
            End
            Begin VB.Label Label6 
               BackColor       =   &H80000005&
               Caption         =   "紗織"
               Height          =   255
               Index           =   1
               Left            =   6120
               TabIndex        =   15
               Top             =   1200
               Width           =   1035
            End
            Begin VB.Label Label3 
               BackColor       =   &H80000005&
               Caption         =   "類型"
               Height          =   255
               Index           =   0
               Left            =   1020
               TabIndex        =   14
               Top             =   660
               Width           =   1035
            End
            Begin VB.Label Label7 
               BackColor       =   &H80000005&
               Caption         =   "成品組織"
               Height          =   255
               Index           =   2
               Left            =   1020
               TabIndex        =   13
               Top             =   1740
               Width           =   1035
            End
            Begin VB.Label Label8 
               BackColor       =   &H80000005&
               Caption         =   "胚組織"
               Height          =   255
               Left            =   6120
               TabIndex        =   12
               Top             =   1740
               Width           =   1035
            End
            Begin VB.Image Image1 
               Height          =   480
               Left            =   240
               Picture         =   "frmStorehouseProductMan.frx":467A
               Top             =   480
               Width           =   480
            End
            Begin VB.Label Label12 
               BackColor       =   &H00FFFFFF&
               Caption         =   "模糊查询项"
               Height          =   255
               Left            =   1920
               TabIndex        =   11
               Top             =   4260
               Width           =   915
            End
            Begin VB.Label Label15 
               BackColor       =   &H00C0FFC0&
               Height          =   195
               Left            =   1320
               TabIndex        =   10
               Top             =   4260
               Width           =   375
            End
         End
         Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHF1 
            Height          =   8115
            Left            =   120
            TabIndex        =   20
            Top             =   240
            Width           =   14775
            _ExtentX        =   26061
            _ExtentY        =   14314
            _Version        =   393216
            AllowUserResizing=   1
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            _NumberOfBands  =   1
            _Band(0).Cols   =   2
         End
      End
   End
End
Attribute VB_Name = "frmBasicFabric"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim lngrow As Integer

Private Sub ActiveBar21_ComboSelChange(ByVal Tool As ActiveBar2LibraryCtl.Tool)
    If Tool.CBListIndex = 0 Then
        If viewFlag = True Then viewFlag = False
        Me.Caption = "布種布樣" & "      成品信息"
        FillMshf1 ("select * from tBasicProduct")
    Else
        If viewFlag = False Then viewFlag = True
        Me.Caption = "布種布樣" & "      原布信息"
        FillMshf1 ("select * from tBasicFabric")
    End If
End Sub

Private Sub ActiveBar21_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)

    Select Case Tool.Name
    Case "cmdAdd":
        NewOperatorInf
    Case "cmdEdit":
        EditOperatorInf
    Case "cmdDel":
        DelOperatorInf
    Case "cmdFind"
        fraFind.Visible = True
    Case "cmdCancel":
        Unload Me
    Case "cmdRefurbish"
        MSHF1.Refresh
    Case "cmdRecycle":
        frmUnProduction.Show
    Case "cmdExport":
        Dim strFile As String
        frmMain.CDFile.ShowOpen
        strFile = frmMain.CDFile.FileName
        If strFile = "" Then Exit Sub
        ExportExcel MSHF1, strFile
    End Select
End Sub
Private Function FormatQuery() As String
    If viewFlag Then
        If Records <> "" And Records = "All" Then
                FormatQuery = "select * from tBasicFabric"
        Else
                FormatQuery = "select top " & Trim(Records.Text) & " from tBasicFabric"
        End If
    Else
        If Records <> "" And Records = "All" Then
                FormatQuery = "select * from tBasicProduct"
        Else
                FormatQuery = "select top " & Trim(Records.Text) & " from tBasicProduct"
        End If
    End If
    If Trim$(txtCode.Text) = "" Then
        FormatQuery = FormatQuery & " where FabricCode<>''"
    Else
        FormatQuery = FormatQuery & " where FabricCode='" & txtCode.Text & "'"
    End If
    If Trim$(txtName) <> "" Then
        FormatQuery = FormatQuery & " and FabricName='" & Trim(txtName.Text) & "'"
    End If
    If Trim$(txtType) <> "" Then
        FormatQuery = FormatQuery & " and Fabrictype='" & Trim(txtType.Text) & "'"
    End If
    If Trim$(txtWales) <> "" Then
        FormatQuery = FormatQuery & " and Walse='" & Trim(txtWales.Text) & "'"
    End If
    If Trim$(WarpOfCon) <> "" And Trim$(comWarpOfCon) <> "between" Then
        FormatQuery = FormatQuery & " and WarpOfCon " & comWarpOfCon.Text & WarpOfCon
    End If
    If Trim$(Warp) <> "" And Trim$(comWarp) <> "between" Then
        FormatQuery = FormatQuery & " and Warp " & comWarp.Text & Warp
    End If
    If Trim$(WeftOfCon) <> "" And Trim$(comWeftOfCon) <> "between" Then
        FormatQuery = FormatQuery & " and WeftOfCon " & comWeftOfCon.Text & WeftOfCon
    End If
    If Trim$(Weft) <> "" And Trim$(comWeft) <> "between" Then
        FormatQuery = FormatQuery & " and Weft " & comWeft.Text & Weft
    End If
    If Trim$(Weight) <> "" And Trim$(comWeight) <> "between" Then
        FormatQuery = FormatQuery & " and Weight " & comWeight.Text & Weight
    End If
    If Trim$(endWeftOfCon) <> "" And Trim$(WeftOfCon) <> "" And Trim$(comWeftOfCon) = "between" Then
        FormatQuery = FormatQuery & " and WeftOfCon between " & WeftOfCon & " and " & endWeftOfCon
    End If
    If Trim$(endWeft) <> "" And Trim$(Weft) <> "" And Trim$(comWeft) = "between" Then
        FormatQuery = FormatQuery & " and Weft between " & Weft & " and " & endWeft
    End If
    If Trim$(endWarpOfCon) <> "" And Trim$(WarpOfCon) <> "" And Trim$(comWarpOfCon) = "between" Then
        FormatQuery = FormatQuery & " and WarpOfCon between " & WarpOfCon & " and " & endWarpOfCon
    End If
    If Trim$(endWeight) <> "" And Trim$(Weight) <> "" And Trim$(comWeight) = "between" Then
        FormatQuery = FormatQuery & " and Weight between " & Weight & " and " & endWeight
    End If
    If Trim$(endWarp) <> "" And Trim$(Warp) <> "" And Trim$(comWarp) <> "between" Then
        FormatQuery = FormatQuery & " and Warp between " & Warp & " and " & endWarp
    End If
    If Trim$(txtSazi) <> "" Then
        FormatQuery = FormatQuery & " and sazi" & objDatabase.FormatLikeSQL(Trim(txtSazi.Text))
    End If
    If Trim$(txtComposition) <> "" Then
        FormatQuery = FormatQuery & " and wales" & objDatabase.FormatLikeSQL(Trim(txtComposition.Text))
    End If
    If Trim$(txtConstrusion) <> "" Then
        FormatQuery = FormatQuery & " and Construstion" & objDatabase.FormatLikeSQL(Trim(txtConstrusion.Text))
    End If
    If Trim$(txtGreige) <> "" Then
        FormatQuery = FormatQuery & " and Greige" & objDatabase.FormatLikeSQL(Trim(txtGreige.Text))
    End If
    If chkFoundDate.Value = vbChecked Then
          FormatQuery = FormatQuery & " and UpdateDate >= '" & DTFoundDate.Value & "'"
          FormatQuery = FormatQuery & " and UpdateDate <='" & DTFoundDateEnd.Value & "'"
    End If
End Function
Public Sub FillMshf1(ByVal strSql As String)
   Dim rs As ADODB.Recordset
   Dim lngrow As Long
      Screen.MousePointer = vbHourglass
      On Error GoTo errLabel
      Set rs = New ADODB.Recordset
      With rs
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        Set .ActiveConnection = Cn
      End With
      rs.Open strSql
      With MSHF1
          .Redraw = False
          .Rows = 2
          .Clear
          If viewFlag Then .Cols = 33 Else .Cols = 34
          '初始化
         .WordWrap = False
         .TextMatrix(0, 0) = "序號"
          .ColWidth(0) = 900
         .TextMatrix(0, 1) = "創建日期"
          .ColWidth(1) = 1500
         .TextMatrix(0, 2) = "布號"
          .ColWidth(2) = 900
          If viewFlag = False Then
          .TextMatrix(0, 3) = "原布號"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -