?? frmstoreroom.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 FrmStoreRoom
Caption = "ERP-庫存管理子系統"
ClientHeight = 9435
ClientLeft = 60
ClientTop = 510
ClientWidth = 15240
Icon = "FrmStoreRoom.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 9435
ScaleWidth = 15240
WindowState = 2 'Maximized
Begin MSDataGridLib.DataGrid DataGrid1
Height = 5775
Left = 4080
TabIndex = 5
Top = 2040
Width = 7335
_ExtentX = 12938
_ExtentY = 10186
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 4
BeginProperty Column00
DataField = "StoreID"
Caption = "庫位ID"
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 = "StoreRoom"
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 = "Location"
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 = "Description"
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 = 1785.26
EndProperty
BeginProperty Column01
ColumnWidth = 1860.095
EndProperty
BeginProperty Column02
ColumnWidth = 1725.165
EndProperty
BeginProperty Column03
ColumnWidth = 1635.024
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1320
Top = 6000
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 661
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Image Image4
Height = 300
Left = 9240
Picture = "FrmStoreRoom.frx":0CCA
Top = 8040
Width = 300
End
Begin VB.Label LblBack
BackStyle = 0 'Transparent
Caption = "返回"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 9840
MouseIcon = "FrmStoreRoom.frx":10E6
MousePointer = 99 'Custom
TabIndex = 4
Top = 8040
Width = 615
End
Begin VB.Image Image3
Height = 300
Left = 7800
Picture = "FrmStoreRoom.frx":13F0
Top = 8040
Width = 300
End
Begin VB.Label LblDelete
BackStyle = 0 'Transparent
Caption = "刪除"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8400
MouseIcon = "FrmStoreRoom.frx":180C
MousePointer = 99 'Custom
TabIndex = 3
Top = 8040
Width = 615
End
Begin VB.Image Image2
Height = 300
Left = 6360
Picture = "FrmStoreRoom.frx":1B16
Top = 8040
Width = 300
End
Begin VB.Label LblModify
BackStyle = 0 'Transparent
Caption = "修改"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6960
MouseIcon = "FrmStoreRoom.frx":1F32
MousePointer = 99 'Custom
TabIndex = 2
Top = 8040
Width = 615
End
Begin VB.Image Image1
Height = 300
Left = 4800
Picture = "FrmStoreRoom.frx":223C
Top = 8040
Width = 300
End
Begin VB.Label LblAdd
BackStyle = 0 'Transparent
Caption = "添加"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5400
MouseIcon = "FrmStoreRoom.frx":2658
MousePointer = 99 'Custom
TabIndex = 1
Top = 8040
Width = 615
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "庫位信息"
BeginProperty Font
Name = "宋體"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6840
TabIndex = 0
Top = 1200
Width = 1935
End
End
Attribute VB_Name = "FrmStoreRoom"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc1.RecordSource = "select * from StoreRoom"
Set DataGrid1.DataSource = Adodc1
Refresh_StoreRoom
End Sub
Private Sub LblAdd_Click()
FrmStoreRoomEdit.Caption = "添加庫位"
FrmStoreRoomEdit.Modify = False
FrmStoreRoomEdit.Show 1
Refresh_StoreRoom
End Sub
Private Sub LblBack_Click()
Unload Me
End Sub
Private Sub LblDelete_Click()
Dim TempStoreRoomID As Integer
'保存待刪除記錄的ID
TempStoreRoomID = Adodc1.Recordset.Fields(0)
'彈出刪除確認對話框
If MsgBox("是否刪除" + Adodc1.Recordset.Fields(1) + "?", vbYesNo, "確認") = vbYes Then
MyStoreRoom.Delete (TempStoreRoomID)
MsgBox "刪除成功"
End If
Refresh_StoreRoom
End Sub
Private Sub LblModify_Click()
'保存待修改記錄的原始ID
FrmStoreRoomEdit.OriStoreID = Trim(Adodc1.Recordset.Fields(0))
'把待修改信息添加到編輯窗口
FrmStoreRoomEdit.TxtStoreID = Trim(Adodc1.Recordset.Fields(0))
FrmStoreRoomEdit.TxtStoreRoom = Trim(Adodc1.Recordset.Fields(1))
FrmStoreRoomEdit.TxtLocation = Trim(Adodc1.Recordset.Fields(2))
FrmStoreRoomEdit.TxtDescription = Trim(Adodc1.Recordset.Fields(3))
FrmStoreRoomEdit.TxtStoreID.Enabled = False
FrmStoreRoomEdit.Caption = "修改庫位信息"
FrmStoreRoomEdit.Modify = True
FrmStoreRoomEdit.Show 1
Refresh_StoreRoom
End Sub
Private Sub Refresh_StoreRoom()
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
LblModify.Enabled = False
LblDelete.Enabled = False
Else
LblModify.Enabled = True
LblDelete.Enabled = True
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -