main_kcgl_kcpd.frm

来自「完整的物资管理系统源码」· FRM 代码 · 共 632 行 · 第 1/2 页

FRM
632 行
字号
         Caption         =   "盈亏数量"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         MarqueeStyle    =   4
         BeginProperty Column00 
            ColumnWidth     =   555.024
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1349.858
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   959.811
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1005.165
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   945.071
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   524.976
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   615.118
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   420.095
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   464.882
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   555.024
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   900.284
         EndProperty
         BeginProperty Column11 
            ColumnWidth     =   1275.024
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame1 
      Caption         =   "查询条件"
      Height          =   1065
      Left            =   15
      TabIndex        =   0
      Top             =   660
      Width           =   10620
      Begin VB.TextBox text1 
         BackColor       =   &H80000018&
         Height          =   285
         Index           =   2
         Left            =   8895
         TabIndex        =   5
         Top             =   240
         Width           =   1590
      End
      Begin VB.TextBox text1 
         BackColor       =   &H80000018&
         Height          =   285
         Index           =   1
         Left            =   3915
         TabIndex        =   4
         Top             =   225
         Width           =   4020
      End
      Begin VB.TextBox text1 
         BackColor       =   &H80000018&
         Height          =   285
         Index           =   4
         Left            =   6930
         TabIndex        =   2
         Top             =   660
         Width           =   3570
      End
      Begin VB.TextBox text1 
         BackColor       =   &H80000018&
         Height          =   285
         Index           =   0
         Left            =   1050
         TabIndex        =   1
         Top             =   240
         Width           =   1875
      End
      Begin VB.TextBox text1 
         BackColor       =   &H80000018&
         Height          =   285
         Index           =   3
         Left            =   1050
         TabIndex        =   3
         Top             =   660
         Width           =   5190
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "材质:"
         Height          =   180
         Index           =   4
         Left            =   6420
         TabIndex        =   10
         Top             =   705
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "计量单位:"
         Height          =   180
         Index           =   3
         Left            =   8010
         TabIndex        =   9
         Top             =   300
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "物资名称:"
         Height          =   180
         Index           =   2
         Left            =   3000
         TabIndex        =   8
         Top             =   285
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "规格型号:"
         Height          =   180
         Index           =   1
         Left            =   135
         TabIndex        =   7
         Top             =   705
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "物资编号:"
         Height          =   180
         Index           =   0
         Left            =   135
         TabIndex        =   6
         Top             =   315
         Width           =   900
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   345
      Left            =   1020
      Top             =   2625
      Visible         =   0   'False
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   609
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mr_material"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=mr_material"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from tb_kc"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "main_kcgl_kcpd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public selectsql As String
Public oldBookmark1

Private Sub Form_Activate()
  If ck <> "" Then
     If selectsql <> "" Then
        Adodc1.RecordSource = "select * from tb_kc where " & selectsql & " and 仓库=" & ck
        Adodc1.Refresh
     Else
        Adodc1.RecordSource = "select * from tb_kc where 仓库='" + ck + "'"
        Adodc1.Refresh
     End If
  Else
     Adodc1.RecordSource = "select * from tb_kc"
     Adodc1.Refresh
  End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
  Select Case Button.Key
    Case "cx"
      selectsql = ""
      If Text1(0) <> "" Then
        If selectsql <> "" Then
          selectsql = "物资编号 like +'" + Text1(0) + "'+'%'and " & selectsql
        Else
          selectsql = "物资编号 like +'" + Text1(0) + "'+'%'"
        End If
      End If
      If Text1(1) <> "" Then
        If selectsql <> "" Then
          selectsql = "物资名称 like+ '" + Text1(1) + "'+'%'and " & selectsql
        Else
          selectsql = "物资名称 like + '" + Text1(1) + "'+'%'"
        End If
      End If
      If Text1(2) <> "" Then
        If selectsql <> "" Then
          selectsql = "规格型号 like+ '" + Text1(3) + "'+'%'and " & selectsql
        Else
          selectsql = "规格型号 like+ '" + Text1(3) + "'+'%'"
        End If
      End If
      If Text1(3) <> "" Then
        If selectsql <> "" Then
          selectsql = "计量单位 like +'" + Text1(2) + "'+'%'and " & selectsql
        Else
          selectsql = "计量单位 like + '" + Text1(2) + "'+'%'"
        End If
      End If
      If Text1(4) <> "" Then
        If selectsql <> "" Then
          selectsql = "材质 like+ '" + Text1(4) + "'+'%'and " & selectsql
        Else
          selectsql = "材质 like +'" + Text1(4) + "'+'%'"
        End If
      End If
      If selectsql <> "" Then
        Adodc1.RecordSource = "select * from tb_kc where " & selectsql
        Adodc1.Refresh
      Else
        Adodc1.RecordSource = "select * from tb_kc"
        Adodc1.Refresh
      End If
    Case "delete"
      Dim style, myval
      If Adodc1.Recordset.RecordCount > 0 Then
        style = vbYesNo + vbCritical + vbDefaultButton2
        myval = MsgBox("是否删除该商品?", style, "提示窗口")
        If myval = vbYes Then
          Adodc1.Recordset.Delete
          Adodc1.Recordset.Update
        End If
      End If
    Case "pdsl"
      myval = InputBox("请输入实际数量", "输入")
      cnn.Execute ("update tb_kc set 实际数量=" & Val(myval) & " where 物资编号='" + DataGrid1.Columns(1) + "'and 物资名称='" + DataGrid1.Columns(2) + "'and 规格型号='" + DataGrid1.Columns(3) + "'")
      oldBookmark1 = DataGrid1.Bookmark
      Adodc1.Refresh
      DataGrid1.Bookmark = oldBookmark1
    Case "pypk"
      cnn.Execute ("update tb_kc set 盈亏数量=实际数量-数量 where 物资编号='" + DataGrid1.Columns(1) + "'and 物资名称='" + DataGrid1.Columns(2) + "'and 规格型号='" + DataGrid1.Columns(3) + "'")
      oldBookmark1 = DataGrid1.Bookmark
      Adodc1.Refresh
      DataGrid1.Bookmark = oldBookmark1
    Case "ck"
      Load main_kcgl_kcpd_ck
      main_kcgl_kcpd_ck.Show 1
    Case "qk"
      cnn.Execute ("update tb_kc set 盈亏数量=0,实际数量=0")
      Adodc1.Refresh
    Case "print"
      Printer.Orientation = vbPRORPortrait
      If ck <> "" Then
         If selectsql <> "" Then
            DataE1.rsCommand2.Open "select * from tb_kc where " & selectsql & " and 仓库=" & ck
         Else
            DataE1.rsCommand2.Open "select * from tb_kc where 仓库='" + ck + "'"
         End If
      Else
         DataE1.rsCommand2.Open "select * from tb_kc"
      End If
      DR_pdbb.Show 1
    Case "exit"
      Unload Me
  
  End Select
End Sub

⌨️ 快捷键说明

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