📄 frmpsedit.frm
字号:
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "操作员:"
Height = 180
Left = 5640
TabIndex = 25
Top = 360
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "入库编号:"
Height = 180
Left = 480
TabIndex = 24
Top = 360
Width = 810
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "仓库:"
Height = 180
Left = 3120
TabIndex = 23
Top = 780
Width = 450
End
End
Begin VB.Frame Frame1
Height = 3050
Left = 0
TabIndex = 6
Top = 0
Width = 8895
Begin VB.CommandButton CmdDep
Caption = "增加(&N)"
Height = 315
Index = 0
Left = 7440
TabIndex = 12
Top = 240
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "编辑(&E)"
Height = 315
Index = 1
Left = 7440
TabIndex = 11
Top = 705
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "查询(&F)"
Height = 315
Index = 2
Left = 7440
TabIndex = 10
Top = 1170
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "删除(&D)"
Height = 315
Index = 3
Left = 7440
TabIndex = 9
Top = 1650
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "列表(&P)"
Height = 315
Index = 4
Left = 7440
TabIndex = 8
Top = 2115
Width = 1275
End
Begin VB.CommandButton CmdDep
Caption = "退出(&X)"
Height = 315
Index = 5
Left = 7440
TabIndex = 7
Top = 2580
Width = 1275
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmPsEdit.frx":12D1
Height = 2655
Left = 120
TabIndex = 13
Top = 240
Width = 7215
_ExtentX = 12726
_ExtentY = 4683
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
HeadLines = 1
RowHeight = 15
TabAcrossSplits = -1 'True
TabAction = 2
WrapCellPointer = -1 'True
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DataMember = "Com订购入库信息"
ColumnCount = 6
BeginProperty Column00
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 Column01
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 Column02
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 Column03
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 Column04
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 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
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnAllowSizing= 0 'False
ColumnWidth = 1005.165
EndProperty
BeginProperty Column01
ColumnAllowSizing= 0 'False
ColumnWidth = 1005.165
EndProperty
BeginProperty Column02
ColumnAllowSizing= 0 'False
ColumnWidth = 1005.165
EndProperty
BeginProperty Column03
ColumnAllowSizing= 0 'False
ColumnWidth = 1005.165
EndProperty
BeginProperty Column04
ColumnAllowSizing= 0 'False
ColumnWidth = 1005.165
EndProperty
BeginProperty Column05
ColumnWidth = 1800
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "frmPsEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rsPsEdit As ADODB.Recordset
Dim SQLPsEdit As String
Dim AddOrEdit As Boolean
Dim rsPsAdd As ADODB.Recordset
Dim rsRparame As ADODB.Recordset
Dim cmdPsEdit As ADODB.Command
Dim lngPsNum As Long
'--------------------控件状态-----------------
Private Sub IsEdit(blnIsEdit As Boolean)
Dim intNum As Integer
'-----------------------
'Me.txtps_id.Enabled = blnIsEdit
Me.txtps_date.Enabled = blnIsEdit
Me.DCserve.Enabled = blnIsEdit
'Me.DCItem.Enabled = blnIsEdit
Me.DCstorage.Enabled = blnIsEdit
Me.txtinfo.Enabled = blnIsEdit
Me.DataGrid1.Enabled = Not blnIsEdit
For intNum = 0 To 3
Me.CmdAct(intNum).Enabled = blnIsEdit
Next
For intNum = 0 To 5
Me.CmdDep(intNum).Enabled = Not blnIsEdit
Next
If Me.txtps_id.Text = "" Then
For intNum = 2 To 3
Me.CmdAct(intNum).Enabled = False
Next
End If
If rsPsEdit.RecordCount = 0 Then
For intNum = 1 To 4
Me.CmdDep(intNum).Enabled = False
Next
End If
If rsPsAdd.RecordCount <> 0 Then
Me.Txtgrid2.Visible = blnIsEdit
Else
Me.Txtgrid2.Visible = False
End If
'------------------------
End Sub
'-----------------------保存与恢复按钮的功能----------
Private Sub CmdAct_Click(Index As Integer)
Dim blnIsTrue As Boolean
With rsPsEdit
Select Case Index
Case 0
blnIsTrue = Save()
If Not blnIsTrue Then
Exit Sub
End If
With rsPsAdd
If .RecordCount <> 0 Then
.MoveFirst
While Not .EOF
!入库编号 = Me.txtps_id.Text
.MoveNext
Wend
End If
End With
rsPsAdd.Filter = "入库编号='" & Me.txtps_id.Text & "'"
rsPsAdd.UpdateBatch
.Filter = "入库编号<>''"
.UpdateBatch
.MoveLast
Call IsEdit(False)
SQLPsEdit = "update 系统启动表 set psnumber=psnumber+1"
cmdPsEdit.CommandText = SQLPsEdit
cmdPsEdit.Execute
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -