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

📄 frmminput.frm

📁 delphi 和ASP BS模式的程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Height          =   780
      Left            =   0
      TabIndex        =   5
      Top             =   0
      Width           =   7290
      _ExtentX        =   12859
      _ExtentY        =   1376
      ButtonWidth     =   1032
      ButtonHeight    =   1376
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   9
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "add"
            Key             =   "add"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "modify"
            Key             =   "modify"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "delete"
            Key             =   "delete"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "find"
            Key             =   "find"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "quit"
            Key             =   "quit"
            ImageIndex      =   5
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   4200
         Top             =   0
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   5
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmminput.frx":0030
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmminput.frx":0484
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmminput.frx":08D8
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmminput.frx":0D2C
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmminput.frx":1180
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Detail:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   120
      TabIndex        =   3
      Top             =   3480
      Width           =   1155
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Material Input"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   3120
      TabIndex        =   1
      Top             =   840
      Width           =   2520
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Common:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   1155
   End
End
Attribute VB_Name = "frmminput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
 On Error GoTo err_handler
 DataGrid2.Bookmark = DataGrid1.Bookmark
 DataGrid2.Refresh
err_handler:
       If err.Number = 6149 Then
           MsgBox "This is a bug on bookmark!", vbOKOnly, "Error"
       End If
End Sub
Private Sub DataGrid2_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
 On Error GoTo err_handler
 DataGrid1.Bookmark = DataGrid2.Bookmark
 DataGrid1.Refresh
err_handler:
       If err.Number = 6149 Then
           MsgBox "This is a bug on bookmark!", vbOKOnly, "Error"
       End If
End Sub


Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
        Case "add"
             frmmaii.Show 1
             
             
        Case "modify"
             If Adodc_mic.Recordset.BOF = True Or Adodc_mid.Recordset.BOF = True Then
                MsgBox "No data to modify now!", vbOKOnly, "Error"
             Else
              Set db = New ADODB.Connection
               With db
                  .Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
                  .Execute "delete from MIDt"
                  .Close
               End With
               With db
                  .Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
                  .Execute "delete from MICt"
                  .Close
               End With
               With db
                  .Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
                  .Execute "insert into MIDt values('" & Trim(Adodc_mid.Recordset.Fields(0)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(1)) & "','" & Trim(Adodc_mid.Recordset.Fields(2)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(3)) & "','" & Trim(Adodc_mid.Recordset.Fields(4)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(5)) & "','" & Trim(Adodc_mid.Recordset.Fields(6)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(7)) & "','" & Trim(Adodc_mid.Recordset.Fields(8)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(9)) & "','" & Trim(Adodc_mid.Recordset.Fields(10)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(11)) & "','" & Trim(Adodc_mid.Recordset.Fields(12)) & "'," & _
                  "'" & Trim(Adodc_mid.Recordset.Fields(13)) & "','" & Trim(Adodc_mid.Recordset.Fields(14)) & "'," & _
                  "'0','" & Trim(Adodc_mid.Recordset.Fields(15)) & "')"
                  .Close
               End With
               With db
                  .Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
                  .Execute "insert into MICt values('" & Trim(Adodc_mic.Recordset.Fields(0)) & "'," & _
                  "'" & Trim(Adodc_mic.Recordset.Fields(1)) & "','" & Trim(Adodc_mic.Recordset.Fields(2)) & "'," & _
                  "'" & Trim(Adodc_mic.Recordset.Fields(3)) & "','" & Trim(Adodc_mic.Recordset.Fields(4)) & "'," & _
                  "'" & Trim(Adodc_mic.Recordset.Fields(5)) & "')"
                  .Close
               End With
               frmmmii.Adodc1.Refresh
               frmmmii.Adodc_mmii.Refresh
               frmmmii.Show 1
             End If
             
        Case "delete"
             If Adodc_mic.Recordset.BOF = True Or Adodc_mid.Recordset.BOF = True Then
             MsgBox "No data to del now!", vbOKOnly, "Error"
             Else
             Set db = New ADODB.Connection
             db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
             db.Execute "update MI set Total = Total-" & Trim(Adodc_mid.Recordset.Fields(11)) & ",Quantity=Quantity-" & Trim(Adodc_mid.Recordset.Fields(9)) & "where MaterialID=" & _
             "'" & Trim(Adodc_mid.Recordset.Fields(4)) & "'"
             db.Close
             Adodc_mic.Recordset.Delete
             Adodc_mid.Recordset.Delete
             Adodc_mic.Refresh
             Adodc_mid.Refresh
             End If
             
        Case "find"
             findmi.Show 1
             
        Case "quit"
             Unload Me
End Select
End Sub

⌨️ 快捷键说明

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