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

📄 froproductionsummaryinfo.frm

📁 企业ERP系统 采用VB+SQL2000实现。 有客户合约
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Left            =   360
            TabIndex        =   18
            Top             =   3660
            Width           =   915
         End
         Begin VB.Label Label27 
            Caption         =   "壞布紗織"
            Height          =   255
            Left            =   4380
            TabIndex        =   17
            Top             =   3720
            Width           =   795
         End
      End
   End
End
Attribute VB_Name = "frmProductionSummaryInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public newItem As Boolean 'true表示增加
Private Sub ActiveBar21_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
    Select Case Tool.Name
            Case "cmdSave":
                 Save newItem
           Case "cmdCancel":
                Unload Me
            Case "cmdDel":
                DelOperatorInf
            Case "cmdPrint"
'                Call PrintEmbryoContract
    End Select
End Sub
Private Sub PrintEmbryoContract()
'   Dim rs As ADODB.Recordset
'   Set rs = New ADODB.Recordset
'   Dim strSql As String
'    With rs
'      .CursorLocation = adUseClient
'      .CursorType = adOpenDynamic
'      .LockType = adLockOptimistic
'      Set .ActiveConnection = cn
'    End With
'    strSql = "select * from tProductionEmbryoContract as a,tBasicFabric as b "
'    strSql = strSql & "where EmbryoContractNo='" & txtEmbryoContractNo & "'and a.FabricCode='" & ComFabricCode & "' and b.FabricCode='" & ComFabricCode & "'"
'    rs.Open strSql
'   With BillEmbryoContract
'       .EmbryoContractNo.SetText (rs.Fields!EmbryoContractNo)
'       .FoundDate.SetText (rs.Fields!FoundDate)
'       .SuppliersName.SetText (rs.Fields!SuppliersName)
'       .Linkman.SetText (rs.Fields!Linkman)
'       .Operation.SetText (rs.Fields!Operation)
'       .FabricName.SetText (rs.Fields!FabricName)
'       .Composition.SetText (rs.Fields!Composition)
'       .fWidth.SetText (txtWidth)
'       .FabricCode.SetText (rs.Fields!FabricCode)
'       .Price.SetText (rs.Fields!Price)
'       .Delivery.SetText (rs.Fields!Delivery)
'       .Remark.SetText (rs.Fields!Remark)
'       .Amount.SetText (rs.Fields!Amount)
'   End With
'    rs.Close
'    Set rs = Nothing
'    frmReportEmbryoContract.Show vbModal
End Sub
Private Sub Form_Load()
    Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
    Initcbb ComFabricNo, "FabricCode", "tBasicFabric"
    Initcbb ComFabricName, "FabricName", "tBasicFabric"
    Initcbb ComFactoryName, "FactoryName", "tBasicFactory"
    InitTitle
End Sub
Private Sub InitTitle()
    Label1.Caption = "加工單編號"
    Label2.item(0).Caption = "所屬公司"
    Label5.Caption = "膠袋包裝"
    Label2.item(1).Caption = "下單日期"
    Label2.item(2).Caption = "交期"
    Label6.Caption = "雙膠袋"
    Label2.item(5).Caption = "簽發者"
    Label7.Caption = "業務員"
    Label2.item(18).Caption = "主光源"
    Label2.item(13).Caption = "工藝"
    Label8.Caption = "加工廠"
    Label12.Caption = "副光源"
    Label2.item(7).Caption = "加工廠單號"
    Label10.Caption = "布號"
    Label13.Caption = "加工"
    Label2.item(11).Caption = "布名"
    Label11.Caption = "布信息"
    Label14.Caption = "經銷"
    Label2.item(4).Caption = "幅寬"
    Label2.item(10).Caption = "密度"
    Label16.Caption = "損耗"
    Label2.item(14).Caption = "紗織"
    Label9.Caption = "坯布幅寬"
    Label17.Caption = "數量"
    Label26.Caption = "坯布密度"
    Label27.Caption = "坯布紗織"
    Label15.Caption = "船頭辦"
    Label3.Caption = "包裝卷筒"
    Label4.Caption = "摺裝"
    Label18.Caption = "投坯備註"
    Label19.Caption = "測試備註"
    Label20.Caption = "備註"
    Label21.Caption = "填寫人"
    Label22.Caption = "填寫日期"
    Me.Caption = "加工單明細"
End Sub
Private Sub DelOperatorInf()
    Dim strSql As String
    On Error GoTo errHandle
    If MsgBox("确定要刪除?", vbQuestion + vbYesNo, "询问") = vbNo Then
        Exit Sub
    Else
        strSql = "delete from  tBusinessOrder where id=" & txtId
        objDatabase.ExecCmd strSql
        MsgBox "刪除成功!", vbInformation, "提示"
    End If
        frmProductionProgress.FillMshf1 ("select * from tBusinessOrder a ,(select distinct orderno,Labdip,LateDate,Composition,LayoutColor,ReportDate,SuppliersName,EmbryoAmount,ProductionState,ProductionQuantity,UlkColor,UlkQuality,UlkLayout,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b where a.orderno=b.orderno")
    Unload Me
    Exit Sub
errHandle:
   objDatabase.DatabaseError
    
End Sub
Public Sub InitInfo(strId As String)
    If newItem = False Then
    Dim rs As ADODB.Recordset
      SystemExecuteStart Me
     ' On Error GoTo errLabel
      Set rs = New ADODB.Recordset
      With rs
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        Set .ActiveConnection = Cn
      End With
      Dim strSql As String
        strSql = "select * from tBusinessOrder a ,"
        strSql = strSql & "(select distinct orderno,Labdip,LateDate,Composition,LayoutColor,ReportDate,SuppliersName,EmbryoAmount,ProductionState,ProductionQuantity,UlkColor,UlkQuality,UlkLayout,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b "
        strSql = strSql & "where a.orderno=b.orderno and a.id=" & strId
        rs.Open strSql
        If Not rs.EOF Then
            txtOrderNo.Text = rs.Fields("OrderNo")
            txtOrderNo.Enabled = False
            txtCompanyName = rs.Fields!CompanyName
            Founddate = rs.Fields!Founddate
            Delivery.Value = rs.Fields!Delivery
            txtIssuer = rs.Fields!issuer
            txtOperation = rs.Fields!Operation
            txtStandard = rs.Fields!Standard
            ComFactoryName = rs.Fields!FactoryName
            txtFactoryNo = rs.Fields!FactoryNo
            ComFabricNo = rs.Fields!FabricNo
            ComFabricName = rs.Fields!FabricName
            txtComposition = rs.Fields!Composition
            txtwidth = rs.Fields!Width
            txtdensity = rs.Fields!density
            txtYarn = rs.Fields!Yarn
            txtEmbryoWidth = rs.Fields!embryowidth
            txtEmbryodensity = rs.Fields!embryodensity
            txtEmbryoYarn = rs.Fields!embryoyarn
            txtPacking1 = rs.Fields!packing1
            txtPacking2 = rs.Fields!packing2
            txtPacking3 = rs.Fields!packing3
            txtPacking4 = rs.Fields!packing4
            txtSource1 = rs.Fields!source1
            txtSource2 = rs.Fields!source2
            txtSource3 = rs.Fields!source3
            txtSource4 = rs.Fields!source4
            txtBowQuantity = rs.Fields!bowquantity
            txtLossQuantity = rs.Fields!lossquantity
            txtQuantity = rs.Fields!Quantity
            txtEmbryoRemarks = rs.Fields!embryoremarks
            txtTestRemarks = rs.Fields!testremarks
            txtRemarks = rs.Fields!Remarks
            txtUpdateOperator = rs.Fields!UpdateOperator
            txtUpdateDate = rs.Fields!UpdateDate
            txtId = rs.Fields("id")
        End If
        rs.Close
      Set rs = Nothing
      SystemExecuteEnd Me
Exit Sub
SystemExecuteEnd Me
Exit Sub
End If
errLabel:
    SystemExecuteEnd Me
    objDatabase.DatabaseError
End Sub
Private Sub Save(Optional blModi As Boolean)
    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
        On Error GoTo errHandle
        If txtOrderNo = "" Then
            MsgBox "請填寫加工單號", vbCritical, "提示"
            txtOrderNo.SetFocus
            Exit Sub
        End If
        If IsNumeric(txtQuantity) = False Then
            MsgBox "請在數量上填寫正確格式", vbCritical, "提示"
            txtQuantity.SetFocus
            Exit Sub
        End If
        If blModi Then
        strSql = "select * from tBusinessOrder"
        rs.Open strSql
            If MsgBox("是否增加?", vbQuestion + vbYesNo, "询问") = vbNo Then
                rs.Close
                Set rs = Nothing
                Exit Sub
            End If
                    
            rs.AddNew '新建
        Else
            strSql = "select * from tBusinessOrder where id=" & txtId
            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
        End If
        rs.Fields!OrderNo = txtOrderNo
        rs.Fields!CompanyName = txtCompanyName
        rs.Fields!Founddate = Founddate
        rs.Fields!Delivery = Delivery
        rs.Fields!issuer = txtIssuer
        rs.Fields!Operation = txtOperation
        rs.Fields!Standard = txtStandard
        rs.Fields!FactoryName = ComFactoryName
        rs.Fields!FactoryNo = txtFactoryNo
        rs.Fields!FabricNo = ComFabricNo
        rs.Fields!FabricName = ComFabricName
        rs.Fields!Composition = txtComposition
        rs.Fields!Width = txtwidth
        rs.Fields!density = txtdensity
        rs.Fields!Yarn = txtYarn
        rs.Fields!embryowidth = txtEmbryoWidth
        rs.Fields!embryodensity = txtEmbryodensity
        rs.Fields!embryoyarn = txtEmbryoYarn
        rs.Fields!packing1 = txtPacking1
        rs.Fields!packing2 = txtPacking2
        rs.Fields!packing3 = txtPacking3
        rs.Fields!packing4 = txtPacking4
        rs.Fields!source1 = txtSource1
        rs.Fields!source2 = txtSource2
        rs.Fields!source3 = txtSource3
        rs.Fields!source4 = txtSource4
        rs.Fields!bowquantity = txtQuantity
        rs.Fields!lossquantity = txtLossQuantity
        rs.Fields!Quantity = txtQuantity
        rs.Fields!embryoremarks = txtEmbryoRemarks
        rs.Fields!testremarks = txtTestRemarks
        rs.Fields!Remarks = txtRemarks
        rs.Fields!UpdateOperator = txtUpdateOperator
        rs.Fields!UpdateDate = Now
        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,UlkColor,UlkQuality,UlkLayout,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b where a.orderno=b.orderno")
        Unload Me
        Exit Sub
errHandle:
    Set rs = Nothing
    objDatabase.DatabaseError
End Sub

⌨️ 快捷键说明

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