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

📄 frmproductionsummaryseason.frm

📁 企业ERP系统 采用VB+SQL2000实现。 有客户合约
💻 FRM
字号:
VERSION 5.00
Object = "{4932CEF1-2CAA-11D2-A165-0060081C43D9}#2.0#0"; "Actbar2.OCX"
Begin VB.Form frmProductionSummarySeason 
   Caption         =   "季節信息"
   ClientHeight    =   1755
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3630
   LinkTopic       =   "Form1"
   ScaleHeight     =   1755
   ScaleWidth      =   3630
   StartUpPosition =   3  'Windows Default
   Begin ActiveBar2LibraryCtl.ActiveBar2 ActiveBar21 
      Height          =   1755
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3630
      _LayoutVersion  =   1
      _ExtentX        =   6403
      _ExtentY        =   3096
      _DataPath       =   ""
      Bands           =   "frmProductionSummarySeason.frx":0000
      Begin VB.Frame Frame1 
         Height          =   1155
         Left            =   60
         TabIndex        =   1
         Top             =   540
         Width           =   3495
         Begin VB.TextBox txtSeason 
            Height          =   315
            Left            =   1320
            TabIndex        =   5
            Top             =   660
            Width           =   1995
         End
         Begin VB.TextBox txtOrderNo 
            BackColor       =   &H8000000F&
            Enabled         =   0   'False
            Height          =   315
            Left            =   1320
            MaxLength       =   20
            TabIndex        =   2
            Top             =   240
            Width           =   1995
         End
         Begin VB.Label Label22 
            Caption         =   "交貨季節"
            Height          =   255
            Left            =   180
            TabIndex        =   4
            Top             =   720
            Width           =   1035
         End
         Begin VB.Label Label50 
            Caption         =   "加工單編號"
            Height          =   315
            Left            =   180
            TabIndex        =   3
            Top             =   300
            Width           =   975
         End
      End
   End
End
Attribute VB_Name = "frmProductionSummarySeason"
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 = "加工單編號"
    Label22.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
           txtOrderNo = rs.Fields!OrderNo
           txtSeason = rs.Fields!Season
        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
        rs.Fields!Season = txtSeason
        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


⌨️ 快捷键说明

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