📄 tjgj.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form tjgj
Caption = "工序管理"
ClientHeight = 5985
ClientLeft = 60
ClientTop = 345
ClientWidth = 7725
LinkTopic = "添加工序"
MDIChild = -1 'True
ScaleHeight = 5985
ScaleWidth = 7725
Begin VB.CommandButton Command2
Caption = "删除工序"
Height = 375
Left = 2280
TabIndex = 6
Top = 3720
Width = 1095
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "tjgj.frx":0000
Height = 2535
Left = 120
TabIndex = 5
Top = 120
Width = 6015
_ExtentX = 10610
_ExtentY = 4471
_Version = 393216
HeadLines = 1
RowHeight = 15
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
ColumnCount = 3
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
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 1094.74
EndProperty
BeginProperty Column01
ColumnWidth = 2085.166
EndProperty
BeginProperty Column02
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 4920
Top = 2280
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=.\database.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 工序表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = "添加工序"
Height = 375
Left = 480
TabIndex = 4
Top = 3720
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
Left = 1800
TabIndex = 3
Top = 3120
Width = 2775
End
Begin VB.TextBox Text1
Height = 375
Left = 240
TabIndex = 1
Top = 3120
Width = 1335
End
Begin VB.Label Label2
Caption = "备注"
Height = 255
Left = 1920
TabIndex = 2
Top = 2760
Width = 615
End
Begin VB.Label Label1
Caption = "工序名称"
Height = 255
Left = 240
TabIndex = 0
Top = 2760
Width = 855
End
End
Attribute VB_Name = "tjgj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.text = "" Then
MsgBox "工序名称不能为空"
Else
Adodc1.Refresh
Adodc1.Recordset.Find ("工序名='" & Text1.text & "'")
If Adodc1.Recordset.EOF Then
Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("工序名") = Text1.text
Adodc1.Recordset.Fields("备注") = Text2.text + " "
Adodc1.Recordset.Update
MsgBox "该工序添加成功", vbOKOnly + vbInformation, "提示"
Text1.text = ""
Text2.text = ""
Else
MsgBox "该工序已经添加过了"
End If
End If
End Sub
Private Sub Command2_Click()
If Adodc1.Recordset.EOF = False And Adodc1.Recordset.BOF = False Then
If MsgBox("确实要删除该工序吗", vbOKCancel + vbQuestion, "您将删除以条记录") Then
If MsgBox("删除该记录将删除所对应个工资,是否继续", vbYesNo + vbQuestion, "提示") Then
sql = "delete from 统计表 where 工序号=" & Adodc1.Recordset.Fields("工序号")
delsql (sql)
sql = "delete from 单价表 where 工序号=" & Adodc1.Recordset.Fields("工序号")
delsql (sql)
Adodc1.Recordset.Delete
Adodc1.Refresh
End If
End If
End If
Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -