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

📄 frm_kcgl_cprk.frm

📁 生产管理系统 (VB+SQL Server 2000)在使用本系统的第二套、第三套、第四套、第五套程序时
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
      End
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   705
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   8190
      _ExtentX        =   14446
      _ExtentY        =   1244
      ButtonWidth     =   1138
      ButtonHeight    =   1191
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   13
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   " 增加 "
            Key             =   "add"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "修改"
            Key             =   "modify"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
            Key             =   "delete"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "保存"
            Key             =   "save"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "取消"
            Key             =   "cancel"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "查找"
            Key             =   "find"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "第一条"
            Key             =   "first"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "上一条"
            Key             =   "previous"
            ImageIndex      =   8
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "下一条"
            Key             =   "next"
            ImageIndex      =   9
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "末一条"
            Key             =   "last"
            ImageIndex      =   10
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Enabled         =   0   'False
            Style           =   3
         EndProperty
         BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "关闭"
            Key             =   "close"
            ImageIndex      =   11
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   -240
      Top             =   675
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   26
      ImageHeight     =   26
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   11
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":003D
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":1697
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":2CF1
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":434B
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":59A5
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":6FFF
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":8659
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":9CB3
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":B30D
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":C967
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "Frm_Kcgl_Cprk.frx":DFC1
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "Frm_Kcgl_Cprk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer, Myval As Integer     '定义整型变量
Public blnadd1 As Boolean
Dim Mystr As String   '定义字符变量存储编号信息
Dim rs3 As New ADODB.Recordset
Dim rs4 As New ADODB.Recordset
Dim rs5 As New ADODB.Recordset
Dim rs6 As New ADODB.Recordset
Dim Myrs As New ADODB.Recordset

Dim Mytotal As String
Dim SL1, SL2 As String

Sub view_data()     '定义显示数据的过程
  If Adodc1.Recordset.RecordCount > 0 Then
     With Dgr_Cprk
        If .Columns(0) <> "" Then Text1(0).Text = .Columns(0) Else Text1(0).Text = ""
        If .Columns(1) <> "" Then Cbx_Cpbh.Text = .Columns(1) Else Cbx_Cpbh.Text = ""
        If .Columns(2) <> "" Then Text1(1).Text = .Columns(2) Else Text1(1).Text = ""
        If .Columns(3) <> "" Then Text1(2).Text = .Columns(3) Else Text1(2).Text = ""
        If .Columns(4) <> "" Then Text1(3).Text = .Columns(4) Else Text1(3).Text = ""
        If .Columns(5) <> "" Then Text1(4).Text = .Columns(5) Else Text1(4).Text = ""
        If .Columns(6) <> "" Then Dtp_Rkrq.Value = .Columns(6) Else Dtp_Rkrq.Value = Date
        If .Columns(7) <> "" Then Cbx_jhdbh.Text = .Columns(7) Else Cbx_jhdbh.Text = ""
        If .Columns(8) <> "" Then Text1(5).Text = .Columns(8) Else Text1(5).Text = ""
     End With
  End If
End Sub

Private Sub Cbx_Cpbh_Click()
rs3.Open "select * from tb_SCGL_cpxx where cpxx_id='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then
  Text1(1).Text = rs3.Fields("cpxx_cpmc")
  Text1(2).Text = rs3.Fields("cpxx_cpgg")
  Text1(3).Text = rs3.Fields("cpxx_jldw")
End If
rs3.Close

''rs4.Open "select * from tb_SCGL_scjhd where ( scjhd_cpbh='" + Cbx_Cpbh.Text + "' and scjhd_wcf='否') order by scjhd_id", cnn, adOpenKeyset
''If rs4.RecordCount > 0 Then
''  Cbx_jhdbh.Clear
''  For i = 0 To rs4.RecordCount - 1
''    Cbx_jhdbh.AddItem Trim(rs4.Fields("scjhd_id"))
''    rs4.MoveNext
''  Next i
''  Cbx_jhdbh.ListIndex = 0
''Else
''  Cbx_jhdbh.Clear
''  MsgBox "该产品没有计划单信息", , "信息提示"
''  rs4.Close
''  Exit Sub
''End If
''rs4.Close

End Sub

Private Sub Cbx_jhdbh_GotFocus()
Cbx_jhdbh.BackColor = &HFFFF80
End Sub

Private Sub Cbx_jhdbh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Text1(5).SetFocus
End Sub

Private Sub Cbx_jhdbh_LostFocus()
Cbx_jhdbh.BackColor = &HFFFFFF
rs5.Open "select * from tb_SCGL_scjhd where scjhd_id='" + Cbx_jhdbh.Text + "'and scjhd_wcf='否'", cnn, adOpenKeyset
  If rs5.RecordCount > 0 Then
     Mytotal = Val(rs5.Fields("scjhd_jhsl"))
     If Val(Text1(4).Text) > Mytotal Then
        MsgBox "该计划单需要的产品数量为" + Mytotal + "请选择其他计划单,或更改入库数量!", , "信息提示"
'        Text1(4).SetFocus
        rs5.Close
        Exit Sub
     End If
  End If
rs5.Close

rs3.Open "select * from tb_SCGL_cpxx where cpxx_id='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then
  Text1(1).Text = rs3.Fields("cpxx_cpmc")
  Text1(2).Text = rs3.Fields("cpxx_cpgg")
  Text1(3).Text = rs3.Fields("cpxx_jldw")
End If
rs3.Close

Myrs.Open "select * from tb_SCGL_scjhd where scjhd_id='" + Cbx_jhdbh.Text + "'", cnn, adOpenKeyset
If Myrs.RecordCount <= 0 Then
  MsgBox "请选择正确的生产计划单", , "信息提示"
  Cbx_jhdbh.SetFocus
  Cbx_jhdbh.ListIndex = 0
  Myrs.Close
  Exit Sub
End If
Myrs.Close
End Sub

Private Sub Cbx_Cpbh_GotFocus()
Cbx_Cpbh.BackColor = &HFFFF80
End Sub

Private Sub Cbx_Cpbh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Text1(1).SetFocus
End Sub

Private Sub Cbx_Cpbh_LostFocus()
Cbx_Cpbh.BackColor = &HFFFFFF
rs3.Open "select * from tb_SCGL_cpxx where cpxx_id='" + Cbx_Cpbh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then
  Text1(1).Text = rs3.Fields("cpxx_cpmc")
  Text1(2).Text = rs3.Fields("cpxx_cpgg")
  Text1(3).Text = rs3.Fields("cpxx_jldw")
End If
rs3.Close

rs4.Open "select * from tb_SCGL_scjhd where scjhd_cpbh='" + Cbx_Cpbh.Text + "' and scjhd_wcf='否' order by scjhd_id", cnn, adOpenKeyset
If rs4.RecordCount > 0 Then
  Cbx_jhdbh.Clear
  For i = 0 To rs4.RecordCount - 1
    Cbx_jhdbh.AddItem Trim(rs4.Fields("scjhd_id"))
    rs4.MoveNext
  Next i
  Cbx_jhdbh.ListIndex = 0
Else
  Cbx_jhdbh.Text = ""
  MsgBox "该产品没有计划单", , "信息提示"
  Cbx_Cpbh.SetFocus
End If
rs4.Close
End Sub

Private Sub Dgr_Cprk_Click()
view_data
End Sub

Private Sub Dtp_Rkrq_GotFocus()
Dtp_Rkrq.CalendarBackColor = &HFFFF80
End Sub

Private Sub Dtp_Rkrq_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Cbx_jhdbh.SetFocus
End Sub

Private Sub Dtp_Rkrq_LostFocus()
Dtp_Rkrq.CalendarBackColor = &HFFFFFF
End Sub

Private Sub Form_Activate()
  Adodc1.ConnectionString = PublicStr
  If sql <> "" Then
     Adodc1.RecordSource = sql & " order by cprk_id"
     Adodc1.Refresh
     Call view_data     '调用过程

⌨️ 快捷键说明

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