📄 frmcubestk.frm
字号:
_StyleDefs(62) = "Splits(0).Columns(7).FooterStyle:id=64,.parent=15"
_StyleDefs(63) = "Splits(0).Columns(7).EditorStyle:id=65,.parent=17"
_StyleDefs(64) = "Splits(0).Columns(8).Style:id=90,.parent=13"
_StyleDefs(65) = "Splits(0).Columns(8).HeadingStyle:id=87,.parent=14"
_StyleDefs(66) = "Splits(0).Columns(8).FooterStyle:id=88,.parent=15"
_StyleDefs(67) = "Splits(0).Columns(8).EditorStyle:id=89,.parent=17"
_StyleDefs(68) = "Splits(0).Columns(9).Style:id=94,.parent=13"
_StyleDefs(69) = "Splits(0).Columns(9).HeadingStyle:id=91,.parent=14"
_StyleDefs(70) = "Splits(0).Columns(9).FooterStyle:id=92,.parent=15"
_StyleDefs(71) = "Splits(0).Columns(9).EditorStyle:id=93,.parent=17"
_StyleDefs(72) = "Named:id=33:Normal"
_StyleDefs(73) = ":id=33,.parent=0"
_StyleDefs(74) = "Named:id=34:Heading"
_StyleDefs(75) = ":id=34,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
_StyleDefs(76) = ":id=34,.wraptext=-1"
_StyleDefs(77) = "Named:id=35:Footing"
_StyleDefs(78) = ":id=35,.parent=33,.valignment=2,.bgcolor=&H8000000F&,.fgcolor=&H80000012&"
_StyleDefs(79) = "Named:id=36:Selected"
_StyleDefs(80) = ":id=36,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
_StyleDefs(81) = "Named:id=37:Caption"
_StyleDefs(82) = ":id=37,.parent=34,.alignment=2"
_StyleDefs(83) = "Named:id=38:HighlightRow"
_StyleDefs(84) = ":id=38,.parent=33,.bgcolor=&H8000000D&,.fgcolor=&H8000000E&"
_StyleDefs(85) = "Named:id=39:EvenRow"
_StyleDefs(86) = ":id=39,.parent=33,.bgcolor=&HFFFF00&"
_StyleDefs(87) = "Named:id=40:OddRow"
_StyleDefs(88) = ":id=40,.parent=33"
_StyleDefs(89) = "Named:id=41:RecordSelector"
_StyleDefs(90) = ":id=41,.parent=34"
_StyleDefs(91) = "Named:id=42:FilterBar"
_StyleDefs(92) = ":id=42,.parent=33"
End
Begin MSAdodcLib.Adodc DatPrimaryRs
Height = 330
Left = 1440
Top = 6120
Visible = 0 'False
Width = 1215
_ExtentX = 2143
_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 = ""
Caption = "DatPrimaryRs"
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
End
Attribute VB_Name = "FrmCubeStk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sql As String
Dim RsCone As Recordset
Dim PSql As String
Private Sub Bar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
Unload Me
End Select
End Sub
Private Sub cmdfind_Click()
Call Find
End Sub
Private Sub Dbgrid_DblClick()
If DatPrimaryRS.Recordset.RecordCount = 0 Then Exit Sub
dinno = DatPrimaryRS.Recordset!dinno
If Len(Trim(dinno)) = 0 Then Exit Sub
frmeditstk.Show 1
End Sub
Private Sub DBGrid_HeadClick(ByVal ColIndex As Integer)
Select Case ColIndex
Case 0
PSql = " order by dinno"
Case 1
PSql = " order by din_date"
Case 2
PSql = " order by clino"
Case 3
PSql = " order by model"
Case 4
PSql = " order by total_qty"
Case 5
PSql = " order by model_shape"
Case 6
PSql = " order by finish_date"
Case 7
PSql = " order by shenflag"
Case 8
PSql = " order by jiflag"
Case 9
PSql = " order by tanflag"
Case 10
PSql = " order by zouflag"
Case 11
PSql = " order by moflag"
Case 12
PSql = " order by tieflag"
Case 13
PSql = " order by grflag"
Case 14
PSql = " order by miflag"
End Select
Call Find
End Sub
Private Sub DBGrid_UnboundColumnFetch(Bookmark As Variant, ByVal Col As Integer, value As Variant)
On Error GoTo err
RsCone.Bookmark = Bookmark
If Col = 4 Then value = RsCone!total_qty & RsCone!unit
Exit Sub
err:
Exit Sub
End Sub
Private Sub Form_Activate()
TxtSearch.SetFocus
End Sub
Private Sub Form_Load()
Me.Move 0, 0
Me.Height = 7350
Me.Width = 11690
DTP1.value = Date - 5
DTP2.value = Date
Me.Caption = "仓库单管理系统"
dbgrid.EvenRowStyle.BackColor = &H80000018
dbgrid.OddRowStyle.BackColor = &HEBEBEB
For i = 7 To 9
dbgrid.Columns(i).BackColor = &HFF9D9D
Next
dbgrid.AlternatingRowStyle = True
If PcheckStk = False Then
dbgrid.AllowUpdate = False
Me.Caption = "仓库单管理系统"
Else
dbgrid.AllowUpdate = True
Me.Caption = Me.Caption & " 点击进仓 包装 出货进行修改 ,双击修改出库日期"
End If
PSql = " order by finish_date desc"
Call Find
End Sub
Private Sub Find()
TxtSearch.Text = Trim(TxtSearch.Text)
If Len(TxtSearch.Text) = 0 Then
sql = "select * from Din where type<>'作废' and din_date>=" & "'" & DTP1.value & "'" & _
" and din_date<=" & "'" & DTP2.value & "'"
Else
sql = "select * from Din where (dinno like '%" & TxtSearch.Text & "%'" & _
" or model like '%" & TxtSearch.Text & "%'" & _
" or model_shape like '%" & TxtSearch.Text & "%')" & _
" and (din_date>=" & "'" & DTP1.value & "'" & _
" and din_date<=" & "'" & DTP2.value & "')"
End If
If op(0).value = True Then
sql = sql
End If
If op(1).value = True Then
sql = sql & " and miflag=-1"
End If
If op(2).value = True Then
sql = sql & " and miflag=0"
End If
sql = sql & PSql
DatPrimaryRS.ConnectionString = SqlConn
DatPrimaryRS.RecordSource = sql
DatPrimaryRS.Refresh
Set RsCone = DatPrimaryRS.Recordset.Clone()
dbgrid.Refresh
End Sub
Private Sub Form_Resize()
'On Error Resume Next
'Me.Top = 0
'Me.Left = 50
End Sub
Private Sub op_Click(Index As Integer)
Call Find
End Sub
Private Sub TxtSearch_KeyDown(KeyCode As Integer, Shift As Integer)
If Len(Trim(TxtSearch.Text)) = 0 Then Exit Sub
If KeyCode = 13 Then Call Find
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -