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

📄 frmmmii.frm

📁 delphi 和ASP BS模式的程序
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   22
         Left            =   200
         TabIndex        =   18
         Top             =   350
         Width           =   1700
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "Common"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1695
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   7815
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   375
         Left            =   5520
         Top             =   1200
         Visible         =   0   'False
         Width           =   1935
         _ExtentX        =   3413
         _ExtentY        =   661
         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=True;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
         OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   "sa"
         Password        =   ""
         RecordSource    =   "select * from MICt"
         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
      Begin VB.ComboBox Combo2 
         Height          =   300
         Left            =   5880
         TabIndex        =   38
         Top             =   360
         Width           =   1695
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         DataSource      =   "Adodc1"
         Height          =   375
         Left            =   1920
         TabIndex        =   37
         Top             =   240
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   661
         _Version        =   393216
         Enabled         =   0   'False
         Format          =   23789569
         CurrentDate     =   37768
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   10
         Left            =   1920
         TabIndex        =   29
         Top             =   1200
         Width           =   1700
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   2
         Left            =   5900
         TabIndex        =   2
         Top             =   840
         Width           =   1700
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Index           =   1
         Left            =   1920
         TabIndex        =   1
         Top             =   780
         Width           =   1700
      End
      Begin VB.Label Label2 
         Caption         =   "Warehouse:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   4080
         TabIndex        =   28
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "InputDate:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   0
         Left            =   200
         TabIndex        =   6
         Top             =   360
         Width           =   1700
      End
      Begin VB.Label Label1 
         Caption         =   "Invoicemaker:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   12
         Left            =   240
         TabIndex        =   5
         Top             =   840
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "ApprovedBy:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   11
         Left            =   240
         TabIndex        =   4
         Top             =   1275
         Width           =   1695
      End
      Begin VB.Label Label1 
         Caption         =   "InvoiceExamer:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   300
         Index           =   13
         Left            =   4035
         TabIndex        =   3
         Top             =   840
         Width           =   1695
      End
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Height          =   765
      Left            =   5520
      TabIndex        =   27
      Top             =   7560
      Width           =   2115
      _ExtentX        =   3731
      _ExtentY        =   1349
      ButtonWidth     =   1138
      ButtonHeight    =   1349
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   3
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "Save"
            Key             =   "Save"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "Cancel"
            Key             =   "Cancel"
            ImageIndex      =   2
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   1320
         Top             =   120
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   2
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmmmii.frx":0D13
               Key             =   "Save"
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmmmii.frx":102D
               Key             =   "Cancel"
            EndProperty
         EndProperty
      End
   End
End
Attribute VB_Name = "frmmmii"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
 Set db = New ADODB.Connection
 Select Case Button.Key
     Case "Save"
            If Trim(Text2.Text) <> Trim(frmminput.Adodc_mid.Recordset.Fields(11)) Then
            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(Text2.Text) & "" & _
            "-" & Trim(frmminput.Adodc_mid.Recordset.Fields(11)) & "" & _
            "Where MaterialID ='" & Trim(Adodc_mmii.Recordset.Fields(4)) & "'"
            db.Close
            End If
            If Trim(Text5.Text) <> Trim(frmminput.Adodc_mid.Recordset.Fields(9)) Then
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "update MI set Quantity = Quantity+" & Trim(Text5.Text) & "" & _
            "-" & Trim(frmminput.Adodc_mid.Recordset.Fields(9)) & "" & _
            "Where MaterialID ='" & Trim(Adodc_mmii.Recordset.Fields(4)) & "'"
            db.Close
            End If
            frmminput.Adodc_mic.Recordset.Delete
            frmminput.Adodc_mid.Recordset.Delete
            frmminput.Adodc_mic.Refresh
            frmminput.Adodc_mid.Refresh
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "insert into MIC select * from MICt where InputID=" & _
            "'" & Trim(Adodc1.Recordset.Fields(0)) & "'"
            db.Close
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "insert into MID select InputID,InputDate,InputType,Warehouse,MaterialID," & _
               "MaterialName,ModelNo,Unit,MaxToOnce,Quantity,UnitPrice,Total,Status,Vendor,Buyer,Remarks from MIDt " & _
               "where InputID='" & Trim(Adodc1.Recordset.Fields(0)) & "'"
            db.Close
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "update MIDt set Isexamed='1' where InputID=" & _
            "'" & Trim(Adodc1.Recordset.Fields(0)) & "'"
            db.Close
     Case "Cancel"
            Me.Hide
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "delete from MICt"
            db.Close
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                    "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "delete from MIDt"
            db.Close
            frmminput.Adodc_mic.Refresh
            frmminput.Adodc_mid.Refresh
 End Select
End Sub
Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)
 Set db = New ADODB.Connection
 Select Case Button.Key
      Case "In"
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                         "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "insert into MICt values('" & Trim(frmminput.Adodc_mic.Recordset.Fields(0)) & "'," & _
                           "'" & Trim(DTPicker1.Value) & "','" & Trim(Combo2.Text) & "'," & _
                           "'" & Trim(Text1(1).Text) & "','" & Trim(Text1(2).Text) & "'," & _
                           "'" & Trim(Text1(10).Text) & "')"
            db.Close
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                        "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "insert into MIDt values('" & Trim(frmminput.Adodc_mid.Recordset.Fields(0)) & "'," & _
                           "'" & Trim(DTPicker1.Value) & "','" & Trim(Combo3.Text) & "'," & _
                           "'" & Trim(Combo2.Text) & "','" & Trim(Text1(9)) & "'," & _
                           "'" & Trim(Text1(7).Text) & "','" & Trim(Text1(6).Text) & "'," & _
                           "'" & Trim(Text1(8).Text) & "','" & Trim(Text1(5).Text) & "'," & _
                           "'" & Trim(Text5.Text) & "','" & Trim(Text1(4).Text) & "'," & _
                           "'" & Trim(Text2.Text) & "','" & Trim(Text1(3).Text) & "'," & _
                           "'" & Trim(Text3.Text) & "','" & Trim(Text4.Text) & "','1'," & _
                           "'" & Trim(list1.Text) & "')"
            db.Close
            Adodc_mmii.Refresh
       Case "Out"
            Adodc1.Refresh
            DTPicker1.Value = Adodc1.Recordset.Fields(1)
            Combo2.Text = Adodc1.Recordset.Fields(2)
            Text1(1).Text = Adodc1.Recordset.Fields(3)
            Text1(2).Text = Adodc1.Recordset.Fields(4)
            Text1(10).Text = Adodc1.Recordset.Fields(5)
            Combo3.Text = Adodc_mmii.Recordset.Fields(2)
            Text1(7).Text = Adodc_mmii.Recordset.Fields(5)
            Text1(9).Text = Adodc_mmii.Recordset.Fields(4)
            Text1(6).Text = Adodc_mmii.Recordset.Fields(6)
            Text1(8).Text = Adodc_mmii.Recordset.Fields(7)
            Text1(5).Text = Adodc_mmii.Recordset.Fields(8)
            Text5.Text = Adodc_mmii.Recordset.Fields(9)
            Text1(4).Text = Adodc_mmii.Recordset.Fields(10)
            Text2.Text = Adodc_mmii.Recordset.Fields(11)
            Text1(3).Text = Adodc_mmii.Recordset.Fields(12)
            Text3.Text = Adodc_mmii.Recordset.Fields(13)
            Text4.Text = Adodc_mmii.Recordset.Fields(14)
            list1.Text = Adodc_mmii.Recordset.Fields(16)
            
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                        "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "delete from MICt"
            db.Execute "delete from MIDt"
            db.Close
      Case "Cancel"
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                        "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "delete  from pict where InputId='" & Trim(Adodc1.Recordset.Fields(0)) & "'"
            db.Close
            db.Open "Provider=SQLOLEDB.1;Persist Security Info=False;" & _
                        "User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
            db.Execute "delete  from pidt where InputId='" & Trim(Adodc1.Recordset.Fields(0)) & "'"
            db.Close
     End Select
End Sub


⌨️ 快捷键说明

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