whfrmcpxx.frm

来自「适合于中小型企业管理」· FRM 代码 · 共 966 行 · 第 1/3 页

FRM
966
字号
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "参考价格"
         Caption         =   "参考价格"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column06 
         DataField       =   "备注信息"
         Caption         =   "备注信息"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   824.882
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   810.142
         EndProperty
         BeginProperty Column02 
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   1200.189
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   510.236
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   810.142
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   2640.189
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TreeView tv 
      Height          =   6375
      Left            =   120
      TabIndex        =   13
      Top             =   120
      Width           =   3135
      _ExtentX        =   5530
      _ExtentY        =   11245
      _Version        =   393217
      LineStyle       =   1
      Style           =   7
      ImageList       =   "ImageList1"
      Appearance      =   1
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "参考价格"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3480
      TabIndex        =   23
      Top             =   1680
      Width           =   1140
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "备注信息"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3480
      TabIndex        =   17
      Top             =   2640
      Width           =   1140
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "物资编号"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF00FF&
      Height          =   300
      Left            =   8040
      TabIndex        =   15
      Top             =   120
      Width           =   1200
   End
   Begin VB.Label Lablsh 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   7680
      TabIndex        =   14
      Top             =   480
      Width           =   2055
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "类别名称"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3480
      TabIndex        =   11
      Top             =   270
      Width           =   1140
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "物资名称"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3480
      TabIndex        =   10
      Top             =   720
      Width           =   1140
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "物资型号"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3480
      TabIndex        =   9
      Top             =   1200
      Width           =   1140
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "计量单位"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   3480
      TabIndex        =   8
      Top             =   2160
      Width           =   1140
   End
End
Attribute VB_Name = "WhFrmCpxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Rs As ADODB.Recordset
Dim AddFlg As Boolean
Dim CBJ As String
Dim CJMC As String
Dim YGXM As String

Private Sub Combo1_LostFocus()
        Set mrc = New ADODB.Recordset
      TxtSql = "select * from fl_物资类别表 where 类别名称 = '" & combo1.Text & "'"
      mrc.Open Trim$(TxtSql), Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
      If mrc.BOF And mrc.EOF Then
        MsgBox "没有此物资类别!"
      Else
        combo1.Tag = mrc!类别编码
      End If
      mrc.Close

End Sub

Private Sub Command1_Click()
    AddFlg = True
    tv.Enabled = False
    Command1.Enabled = False
    Command2.Enabled = False
    Command3.Enabled = False
    Command4.Enabled = True
    Command5.Enabled = True
    DataGrid1.Enabled = False
    Text1.Enabled = True
    Text1.SetFocus
    Text2.Enabled = True
    Text3.Enabled = True
    Text4.Enabled = True
    combo1.Enabled = True
    
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Lablsh.Caption = ""
    RichTextBox1.Text = ""
    Rs.AddNew
End Sub

Private Sub Command2_Click()
    AddFlg = False
    tv.Enabled = False
    Command1.Enabled = False
    Command2.Enabled = False
    Command3.Enabled = False
    Command4.Enabled = True
    Command5.Enabled = True
    
    Text1.Enabled = True
    Text1.SetFocus
    Text2.Enabled = True
    Text3.Enabled = True
    Text4.Enabled = True
    RichTextBox1.Enabled = True
    combo1.Enabled = True
          
End Sub

Private Sub Command3_Click()
On Error GoTo err
If vbYes = MsgBox("确认是要删除此记录么?", vbYesNo, "删除对话框") Then
    Rs.Delete
    Rs.MoveNext
   If Rs.EOF Then Rs.MoveLast
   loaddata
      TxtSqlbj = "select * from Fl_物资信息表 order by 类别编码,物资编号"
          Set Rstmp = New ADODB.Recordset
    Rstmp.Open TxtSqlbj, Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
      Set DataGrid1.DataSource = Rstmp
      
    display
End If

Exit Sub
err:
If err.Number = 3021 Then
     loaddata
      TxtSqlbj = "select * from Fl_物资信息表 order by 类别编码,物资编号"
          Set Rstmp = New ADODB.Recordset
    Rstmp.Open TxtSqlbj, Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
      Set DataGrid1.DataSource = Rstmp
        MsgBox "此类别暂时没有可用信息!"
        Command2.Enabled = False
        Command3.Enabled = False

⌨️ 快捷键说明

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