?? 職員信息.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 職員信息
BackColor = &H00E0E0E0&
BorderStyle = 3 'Fixed Dialog
Caption = "入庫經辦人信息"
ClientHeight = 5460
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 7815
HelpContextID = 242
Icon = "職員信息.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5460
ScaleWidth = 7815
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSDataGridLib.DataGrid DataGrid1
Height = 4875
Left = 120
TabIndex = 0
ToolTipText = "注意!錄入時 姓名 部門為必填項"
Top = 120
WhatsThisHelpID = 242
Width = 7455
_ExtentX = 13150
_ExtentY = 8599
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 2
RowHeight = 15
AllowAddNew = -1 'True
AllowDelete = -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.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
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
SplitCount = 1
BeginProperty Split0
MarqueeStyle = 2
SizeMode = 1
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 5400
Top = 5040
WhatsThisHelpID = 242
Width = 2535
_ExtentX = 4471
_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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select 編號,姓名,頭銜 as 部門,性別 ,電話號碼,手機,備注 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.Label Label1
BackStyle = 0 'Transparent
Caption = "選中項后,按Delete鍵即可刪除該項,單擊""*""號行的編號列即可增加新記錄."
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 180
TabIndex = 1
Top = 5160
WhatsThisHelpID = 242
Width = 7455
End
End
Attribute VB_Name = "職員信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人為我,我為人人
'枕善居收藏整理
'發(fā)布日期:2008/05/11
'描 述:天宏鋼構倉庫管理系統(tǒng) Ver 2.96
'網 站:http://www.Mndsoft.com/ (VB6源碼博客)
'網 站:http://www.VbDnet.com/ (VB.NET源碼博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代碼別忘記給枕善居哦!
'****************************************************************************
Private m_IsAdd As Boolean
Private SQL As String
Private startcol As Integer
Private endcol As Integer
Private col, row As Integer
Private rowheight As Integer
Private colwidth(18) As Long
Private order(14) As Boolean
Option Explicit
Private Sub initdatagrid1()
DataGrid1.Columns(0).Locked = True '編號
DataGrid1.Columns(0).width = 500
DataGrid1.Columns(1).width = 1800
DataGrid1.Columns(2).width = 1800
DataGrid1.Columns(3).width = 1200
DataGrid1.Columns(4).width = 1800
DataGrid1.Columns(5).width = 1000
DataGrid1.Columns(6).width = 2000
'DataGrid1.Columns(7).width = 1800
'DataGrid1.Columns(8).width = 800
DataGrid1.rowheight = 270
End Sub
Private Sub SaveInit()
startcol = DataGrid1.SelStartCol
endcol = DataGrid1.SelEndCol
col = DataGrid1.LeftCol
row = DataGrid1.row
rowheight = DataGrid1.rowheight
Dim i As Integer
For i = 0 To DataGrid1.Columns.count - 1
colwidth(i) = DataGrid1.Columns(i).width
Next
End Sub
Private Sub ResumeInit()
DataGrid1.SelStartCol = startcol
DataGrid1.SelEndCol = endcol
DataGrid1.Scroll col, row
DataGrid1.rowheight = rowheight
Dim i As Integer
For i = 0 To DataGrid1.Columns.count - 1
DataGrid1.Columns(i).width = colwidth(i)
Next
End Sub
Private Sub DataGrid1_AfterDelete()
'寫入系統(tǒng)日志
fMainForm.WriteLog ("刪除職員")
End Sub
Private Sub DataGrid1_AfterInsert()
'寫入系統(tǒng)日志
fMainForm.WriteLog ("新增職員")
End Sub
Private Sub DataGrid1_AfterUpdate()
'寫入系統(tǒng)日志
fMainForm.WriteLog ("更新職員")
End Sub
Private Sub DataGrid1_BeforeDelete(Cancel As Integer)
On Error Resume Next
'判斷是否其它表單用了待刪除的職員編號
Dim code As String
Dim rs As String
code = DataGrid1.Columns(0).Text
rs = ""
rs = rs + "select 經辦人編號 from 入庫單 where 經辦人編號=" + Str(code): rs = rs + " union "
rs = rs + "select 經辦人編號 from 出庫單 where 經辦人編號=" + Str(code): rs = rs + " union "
rs = rs + "select 經辦人編號 from 借入單 where 經辦人編號=" + Str(code): rs = rs + " union "
rs = rs + "select 經辦人編號 from 借出單 where 經辦人編號=" + Str(code): rs = rs + " union "
rs = rs + "select 經辦人編號 from 調拔單 where 經辦人編號=" + Str(code): rs = rs + " union "
rs = rs + "select 經辦人編號 from 報損單 where 經辦人編號=" + Str(code): rs = rs + " union "
rs = rs + "select 保管員編號 from 倉庫 where 保管員編號=" + Str(code)
fMainForm.m_checkado.RecordSource = rs
fMainForm.m_checkado.Refresh
If fMainForm.m_checkado.Recordset.RecordCount > 0 Then
MsgBox "其它表單用了此職員信息,不能刪除!", vbExclamation
Cancel = True
End If
End Sub
Private Sub DataGrid1_HeadClick(ByVal ColIndex As Integer)
On Error Resume Next
Dim caption As String
caption = DataGrid1.Columns(ColIndex).caption
Adodc1.RecordSource = SQL + " order by " + caption
order(ColIndex) = True - order(ColIndex)
If order(ColIndex) = True Then
Adodc1.RecordSource = Adodc1.RecordSource + " ASC"
Else
Adodc1.RecordSource = Adodc1.RecordSource + " DESC"
End If
SaveInit
Adodc1.Refresh
ResumeInit
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = DataConnectString
SQL = Adodc1.RecordSource
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
Adodc1.Visible = False
initdatagrid1
End Sub
Private Sub DataGrid1_OnAddNew()
DataGrid1.Columns(0).Locked = False
m_IsAdd = True
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
If m_IsAdd = False Then
DataGrid1.Columns(0).Locked = True
Else
m_IsAdd = False
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -