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

📄 frmproductionsummarysub.frm

📁 企业ERP系统 采用VB+SQL2000实现。 有客户合约
💻 FRM
字号:
VERSION 5.00
Object = "{4932CEF1-2CAA-11D2-A165-0060081C43D9}#2.0#0"; "Actbar2.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmProductionSummarySub 
   Caption         =   "生產匯總子信息"
   ClientHeight    =   2745
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7470
   LinkTopic       =   "Form1"
   ScaleHeight     =   2745
   ScaleWidth      =   7470
   StartUpPosition =   3  'Windows Default
   Begin ActiveBar2LibraryCtl.ActiveBar2 ActiveBar21 
      Height          =   2745
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7470
      _LayoutVersion  =   1
      _ExtentX        =   13176
      _ExtentY        =   4842
      _DataPath       =   ""
      Bands           =   "frmProductionSummarySub.frx":0000
      Begin VB.Frame Frame1 
         Height          =   2115
         Left            =   60
         TabIndex        =   1
         Top             =   540
         Width           =   7395
         Begin VB.CheckBox chk1 
            Caption         =   "Check3"
            Height          =   285
            Left            =   3540
            TabIndex        =   18
            Top             =   720
            Width           =   255
         End
         Begin VB.CheckBox chk2 
            Caption         =   "Check2"
            Height          =   285
            Left            =   3540
            TabIndex        =   17
            Top             =   1140
            Width           =   255
         End
         Begin VB.CheckBox chk3 
            Caption         =   "Check1"
            Height          =   285
            Left            =   3540
            TabIndex        =   16
            Top             =   1620
            Width           =   255
         End
         Begin MSComCtl2.DTPicker DTP2 
            Height          =   315
            Left            =   4980
            TabIndex        =   15
            Top             =   1620
            Width           =   1995
            _ExtentX        =   3519
            _ExtentY        =   556
            _Version        =   393216
            Format          =   53149697
            CurrentDate     =   39664
         End
         Begin MSComCtl2.DTPicker DTP1 
            Height          =   315
            Left            =   4980
            TabIndex        =   13
            Top             =   1140
            Width           =   1995
            _ExtentX        =   3519
            _ExtentY        =   556
            _Version        =   393216
            Format          =   53149697
            CurrentDate     =   39664
         End
         Begin VB.TextBox txtUlkQuality 
            Height          =   315
            Left            =   1320
            TabIndex        =   11
            Top             =   720
            Width           =   1995
         End
         Begin MSComCtl2.DTPicker DTPreportdate 
            Height          =   315
            Left            =   4980
            TabIndex        =   10
            Top             =   660
            Width           =   1995
            _ExtentX        =   3519
            _ExtentY        =   556
            _Version        =   393216
            Format          =   53149697
            CurrentDate     =   39644
         End
         Begin VB.TextBox txtOrderNo 
            BackColor       =   &H8000000F&
            Enabled         =   0   'False
            Height          =   315
            Left            =   1320
            MaxLength       =   20
            TabIndex        =   4
            Top             =   240
            Width           =   1995
         End
         Begin VB.TextBox txtUlkLayout 
            BackColor       =   &H00FFFFFF&
            Height          =   315
            Left            =   1320
            MaxLength       =   20
            TabIndex        =   3
            Top             =   1620
            Width           =   1995
         End
         Begin VB.TextBox txtUlkColor 
            BackColor       =   &H00FFFFFF&
            Height          =   315
            Left            =   1320
            MaxLength       =   20
            TabIndex        =   2
            Top             =   1140
            Width           =   1995
         End
         Begin VB.Label Label4 
            Caption         =   "時間"
            Height          =   195
            Left            =   3900
            TabIndex        =   14
            Top             =   1620
            Width           =   795
         End
         Begin VB.Label Label2 
            Caption         =   "時間"
            Height          =   255
            Left            =   3900
            TabIndex        =   12
            Top             =   1200
            Width           =   915
         End
         Begin VB.Label label1 
            Caption         =   "時間"
            Height          =   255
            Left            =   3900
            TabIndex        =   9
            Top             =   720
            Width           =   795
         End
         Begin VB.Label Label50 
            Caption         =   "加工單編號"
            Height          =   315
            Left            =   180
            TabIndex        =   8
            Top             =   300
            Width           =   975
         End
         Begin VB.Label Label40 
            Caption         =   "UlkLayout"
            Height          =   315
            Left            =   180
            TabIndex        =   7
            Top             =   1620
            Width           =   915
         End
         Begin VB.Label Label22 
            Caption         =   "UlkQuality"
            Height          =   255
            Left            =   180
            TabIndex        =   6
            Top             =   720
            Width           =   1035
         End
         Begin VB.Label Label7 
            Caption         =   "UlkColor"
            Height          =   255
            Left            =   180
            TabIndex        =   5
            Top             =   1200
            Width           =   1035
         End
      End
   End
End
Attribute VB_Name = "frmProductionSummarySub"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub ActiveBar21_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
    Select Case Tool.Name
            Case "cmdSave":
                Call Save
           Case "cmdCancel":
                Unload Me
    End Select
End Sub
Private Sub Form_Load()
    Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
    InitTitle
End Sub
Private Sub InitTitle()
    Label50.Caption = "加工單編號"
    label1.Caption = "時間"
    Label2.Caption = "時間"
    Label4.Caption = "時間"
    Me.Caption = "生產匯總子信息"
End Sub
Public Sub InitInfo(strId As String)
    Dim rs As ADODB.Recordset
      SystemExecuteStart Me
     ' On Error GoTo errLabel
      Set rs = New ADODB.Recordset
      With rs
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockBatchOptimistic
        Set .ActiveConnection = Cn
      End With
      Dim strSql As String
        strSql = "select * from tBusinessOrderSub where OrderNo='" & strId & "'"
        rs.Open strSql
        If Not rs.EOF Then
            DTPreportdate.Value = NullValue(rs.Fields!ReportDate)
            DTP1.Value = NullValue(rs.Fields!ReportDate1)
            DTP2.Value = NullValue(rs.Fields!ReportDate2)
            txtOrderNo = NullValue(rs.Fields!OrderNo)
            txtUlkQuality = NullValue(rs.Fields!UlkQuality)
            txtUlkColor = NullValue(rs.Fields!UlkColor)
            txtUlkLayout = NullValue(rs.Fields!UlkLayout)
        End If
      rs.Close
      Set rs = Nothing
      SystemExecuteEnd Me
    Exit Sub
errLabel:
        SystemExecuteEnd Me
        objDatabase.DatabaseError
End Sub
Private Sub Save()
    Dim strSql As String
    Dim rs As ADODB.Recordset
    Set rs = New ADODB.Recordset
    With rs
      .CursorLocation = adUseClient
      .CursorType = adOpenDynamic
      .LockType = adLockOptimistic
      Set .ActiveConnection = Cn
    End With
    If txtOrderNo = "" Then
       MsgBox "請將加工單編號填寫完整 ", vbInformation + vbOKOnly, " 提示"
       Exit Sub
    End If
        On Error GoTo errHandle
            strSql = "select * from tBusinessOrderSub where OrderNo='" & txtOrderNo & "'"
            rs.Open strSql
            If rs.EOF Then '修改
                MsgBox "没有可修改的信息!", vbExclamation, "修改"
                rs.Close
                Set rs = Nothing
                txtOrderNo.SetFocus
                Exit Sub
            End If
            If MsgBox("是否修改记录?", vbYesNo + vbQuestion, "修改") = vbNo Then
                rs.Close
                Set rs = Nothing
                Exit Sub
            End If
        If chk1.Value = vbChecked Then
             rs.Fields!UlkQuality = Trim$(txtUlkQuality)
             rs.Fields!ReportDate = DTPreportdate.Value
        End If
        If chk2.Value = vbChecked Then
             rs.Fields!UlkColor = Trim$(txtUlkColor)
             rs.Fields!ReportDate1 = DTP1.Value
        End If
        If chk3.Value = vbChecked Then
             rs.Fields!UlkLayout = Trim$(txtUlkLayout)
             rs.Fields!ReportDate2 = DTP2.Value
        End If
        rs.Update
        MsgBox "操作成功!", vbInformation, "恭喜"
        rs.Close
        Set rs = Nothing
        frmProductionSummary.FillMshf1 ("select * from tBusinessOrder a ,(select orderno,Labdip,LateDate,Composition,LayoutColor,ReportDate,SuppliersName,EmbryoAmount,ProductionState,ProductionQuantity,season,UlkColor,UlkQuality,UlkLayout,Report,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b where a.orderno=b.orderno")
        Unload Me
        Exit Sub
errHandle:
    Set rs = Nothing
    objDatabase.DatabaseError
End Sub

Private Sub txtAmount_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
   If KeyAscii < 48 Or KeyAscii > 57 Then
            KeyAscii = 0
   End If
End If
End Sub


⌨️ 快捷键说明

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