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

📄 frmcpwh.frm

📁 适合于中小型企业管理
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "刷新"
            Key             =   "sx"
            ImageKey        =   "sx"
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "帮助"
            Key             =   "bz"
            Object.ToolTipText     =   "点击或按F1帮助"
            ImageKey        =   "bz"
         EndProperty
         BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "fh"
            Object.ToolTipText     =   "点击或按Ctrl+X退出"
            ImageKey        =   "tc"
         EndProperty
      EndProperty
      BorderStyle     =   1
      Begin VB.CommandButton Ydcommand1 
         Height          =   300
         Index           =   0
         Left            =   4920
         Picture         =   "FrmCpwh.frx":0342
         Style           =   1  'Graphical
         TabIndex        =   19
         TabStop         =   0   'False
         ToolTipText     =   "搜索..."
         Top             =   120
         Width           =   300
      End
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   0
      Top             =   420
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   29
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":06CC
            Key             =   "sz"
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":0A66
            Key             =   "dy"
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":0E00
            Key             =   "yl"
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":119A
            Key             =   "xg"
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":1534
            Key             =   "zh"
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":18CE
            Key             =   "sh"
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":1C68
            Key             =   "bc"
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":2002
            Key             =   "fq"
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":239C
            Key             =   "bz"
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":2736
            Key             =   "tc"
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":2AD0
            Key             =   "bcgs"
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":2E6A
            Key             =   "mrlk"
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":3204
            Key             =   "xsxm"
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":359E
            Key             =   "first"
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":3938
            Key             =   "prev"
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":3CD2
            Key             =   "next"
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":406C
            Key             =   "last"
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":4406
            Key             =   "xx"
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":47A0
            Key             =   "define"
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":4B3A
            Key             =   "exec"
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":4ED4
            Key             =   "xz"
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":526E
            Key             =   "sc"
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":5608
            Key             =   "sx"
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":59A2
            Key             =   "cx"
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":5D3C
            Key             =   "zd"
         EndProperty
         BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":60D6
            Key             =   "dz"
         EndProperty
         BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":6470
            Key             =   "ph"
         EndProperty
         BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":680A
            Key             =   "fz"
         EndProperty
         BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "FrmCpwh.frx":6BA4
            Key             =   "dw"
         EndProperty
      EndProperty
   End
   Begin VB.PictureBox vsElasticLight1 
      Height          =   480
      Left            =   6660
      ScaleHeight     =   420
      ScaleWidth      =   1140
      TabIndex        =   18
      Top             =   1230
      Width           =   1200
   End
End
Attribute VB_Name = "FrmCpwh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Rec_CodeSet As New ADODB.Recordset   '编码设置表
Dim Lrzt As Integer                      '录入状态标志(0-非录入状态 1-增加 2-修改)
Dim AddFlg As Boolean
'以下为固定使用变量(网格)
Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
Dim Bln_Cancel As Boolean                '取消按钮信息传递
Dim Mrc As ADODB.Recordset
Dim RsCsDel As ADODB.Recordset
Dim DelFlg As Boolean
Dim CmdExe As ADODB.Command

Private Sub BcCommand_Click()

If AddFlg = True Then
    If Trim(LrText(0).Text) = "" Then
            LrText(0).SetFocus
            MsgBox "请正确填选图号!"
            Exit Sub
    Else
          Set Mrc = New ADODB.Recordset
          TxtSql = "select count(*) as Cy from Bs_产品图号 where 图号 = '" & Trim(LrText(0).Text) & "'"
          Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
          Set ExecuteSQL = Mrc
          
            If Mrc!Cy > 0 Then
                LrText(0).SetFocus
                MsgBox "重复图号!"
                Exit Sub
            End If
            Mrc.Close
    End If
    
    If Trim(LrText(1).Text) = "" Then
            LrText(1).SetFocus
            MsgBox "请正确填选品名!"
            Exit Sub
    Else
          Set Mrc = New ADODB.Recordset
          TxtSql = "select count(*) as Cy from Bs_产品图号 where 品名 = '" & Trim(LrText(1).Text) & "'"
          Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
          Set ExecuteSQL = Mrc
          
            If Mrc!Cy > 0 Then
                LrText(1).SetFocus
                MsgBox "重复品名!"
                Exit Sub
            End If
            Mrc.Close
    End If
        
        SqlTxt = "INSERT INTO Bs_产品图号(图号,品名,规格,硝材,创建者,创建日期) VALUES ('" & Trim(LrText(0).Text) _
        & "', '" & Trim(LrText(1).Text) & "', '" & Trim(LrText(2).Text) & "', '" & Trim(LrText(3).Text) & "', '" & Xtczy & "','" & Trim(LrText(5).Text) & "')"
        CmdExe.CommandText = SqlTxt
        CmdExe.Execute
        MsgBox "记录添加成功!", vbInformation
    
Else
    If Trim(LrText(0).Text) = "" Then
            LrText(0).SetFocus
            MsgBox "请正确填选图号!"
            Exit Sub
    Else
          Set Mrc = New ADODB.Recordset
          TxtSql = "select count(*) as Cy from Bs_产品图号 where 图号 = '" & Trim(LrText(0).Text) & "' and id<>'" & Trim(lstContracts.SelectedItem.Text) & "'"
          Mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
          Set ExecuteSQL = Mrc
          
            If Mrc!Cy > 0 Then
                LrText(0).SetFocus
                MsgBox "重复图号!"
                Exit Sub
            End If
            Mrc.Close
    End If
    
    If Trim(LrText(1).Text) = "" Then
            LrText(1).SetFocus
            MsgBox "请正确填选品名!"
            Exit Sub
    Else
          Set Mrc = New ADODB.Recordset
          TxtSql = "select count(*) as Cy from Bs_产品图号 where 品名 = '" & Trim(LrText(1).Text) & "' and id<>'" & Trim(lstContracts.SelectedItem.Text) & "'"

⌨️ 快捷键说明

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