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

📄 frmmoutput.frm

📁 delphi 和ASP BS模式的程序
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      EndProperty
      BeginProperty Column01 
         DataField       =   "OutputDate"
         Caption         =   "OutputDate"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "Warehouse"
         Caption         =   "Warehouse"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "InvoiceMaker"
         Caption         =   "InvoiceMaker"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "InvoiceExaminer"
         Caption         =   "InvoiceExaminer"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "Approvedby"
         Caption         =   "Approvedby"
         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 
         BeginProperty Column00 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc_moc 
      Height          =   375
      Left            =   1680
      Top             =   960
      Visible         =   0   'False
      Width           =   1335
      _ExtentX        =   2355
      _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=False;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=InventoryDB;Data Source=(local)"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   "sa"
      Password        =   ""
      RecordSource    =   "select * from MOC"
      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 MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   780
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7740
      _ExtentX        =   13653
      _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           =   4
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "modify"
            Key             =   "modify"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "delete"
            Key             =   "delete"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "find"
            Key             =   "find"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   4
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "quit"
            Key             =   "quit"
            ImageIndex      =   5
         EndProperty
      EndProperty
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   5280
         Top             =   120
         _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         =   "frmmoutput.frx":0030
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmmoutput.frx":0484
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmmoutput.frx":08D8
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmmoutput.frx":0D2C
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmmoutput.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        =   4
      Top             =   3960
      Width           =   1155
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Material Output"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   3240
      TabIndex        =   2
      Top             =   960
      Width           =   2700
   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        =   1
      Top             =   960
      Width           =   1155
   End
End
Attribute VB_Name = "frmmoutput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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 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 Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
        Case "add"
             frmmaoi.Show 1
             
        Case "modify"
             If Adodc_moc.Recordset.BOF = True Or Adodc_mod.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 MODt"
                  .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 MODt values('" & Trim(Adodc_mod.Recordset.Fields(0)) & "'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(1)) & "','" & Trim(Adodc_mod.Recordset.Fields(2)) & "'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(3)) & "','" & Trim(Adodc_mod.Recordset.Fields(4)) & "'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(5)) & "','" & Trim(Adodc_mod.Recordset.Fields(6)) & "'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(7)) & "','" & Trim(Adodc_mod.Recordset.Fields(8)) & "'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(9)) & "','" & Trim(Adodc_mod.Recordset.Fields(10)) & "'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(11)) & "','" & Trim(Adodc_mod.Recordset.Fields(12)) & "','0'," & _
                  "'" & Trim(Adodc_mod.Recordset.Fields(13)) & "')"
                  .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 MOCt values('" & Trim(Adodc_moc.Recordset.Fields(0)) & "'," & _
                  "'" & Trim(Adodc_moc.Recordset.Fields(1)) & "','" & Trim(Adodc_moc.Recordset.Fields(2)) & "'," & _
                  "'" & Trim(Adodc_moc.Recordset.Fields(3)) & "','" & Trim(Adodc_moc.Recordset.Fields(4)) & "','" & Trim(Adodc_moc.Recordset.Fields(5)) & "')"
                  .Close
               End With
               frmmmoi.Adodc1.Refresh
               frmmmoi.Adodc_mmoi.Refresh
               frmmmoi.Show 1
             End If
        Case "delete"
             If Adodc_moc.Recordset.BOF = True Or Adodc_mod.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_mod.Recordset.Fields(10)) & ",Quantity=Quantity+" & Trim(Adodc_mod.Recordset.Fields(8)) & "where MaterialID=" & _
             "'" & Trim(Adodc_mod.Recordset.Fields(4)) & "'"
             db.Close
             Adodc_moc.Recordset.Delete
             Adodc_mod.Recordset.Delete
             Adodc_moc.Refresh
             Adodc_mod.Refresh
             End If
        Case "find"
             findmo.Show 1
        Case "quit"
           Unload Me
End Select
End Sub


⌨️ 快捷键说明

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