📄 frmzdkc.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Object = "{D07CD9D2-ECE9-493F-86F2-186659945889}#1.0#0"; "Xpbutton.ocx"
Object = "{625E61B9-D59C-4612-89FC-D10614DC5873}#1.0#0"; "CoolBoySkin1.2(修正版).ocx"
Begin VB.Form frmzdkc
BackColor = &H00C0FFC0&
BorderStyle = 0 'None
Caption = "神龙科技(网吧库管)"
ClientHeight = 9165
ClientLeft = 0
ClientTop = 0
ClientWidth = 3285
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 9165
ScaleWidth = 3285
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
Height = 270
Left = 1560
TabIndex = 3
Top = 1185
Visible = 0 'False
Width = 930
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 390
Top = 8670
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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 MSHierarchicalFlexGridLib.MSHFlexGrid MSH
Height = 8025
Left = 255
TabIndex = 1
Top = 525
Width = 2910
_ExtentX = 5133
_ExtentY = 14155
_Version = 393216
FixedCols = 0
BackColorFixed = 16777215
BackColorBkg = -2147483634
Appearance = 0
_NumberOfBands = 1
_Band(0).Cols = 2
End
Begin 工程1.xpcmdbutton xpcmdbutton1
Height = 345
Left = 1275
TabIndex = 0
Top = 8580
Width = 960
_ExtentX = 1693
_ExtentY = 609
Caption = "设置"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CoolBoySkinForVB6.CoolBoySkin CoolBoySkin1
Height = 1845
Left = 90
TabIndex = 4
Top = 1080
Width = 3405
_ExtentX = 6006
_ExtentY = 3254
Caption = "神龙科技(网吧库管)"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MenuBackColor = 16777215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "最低库存报警设置"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 315
Left = 855
TabIndex = 2
Top = 615
Width = 1935
End
End
Attribute VB_Name = "frmzdkc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim oldx As Long
Dim oldy As Long
Dim mov As Boolean
Public zt As Boolean
Dim mshrow As Integer
Dim mshcol As Integer
Private Sub Form_Load()
tim = 0
If username = "" Then loginfrm.Show
Me.Left = Screen.Width - Me.Width
Me.Top = 400
Call topme(Me)
Adodc1.ConnectionString = connstr
Adodc1.CommandType = adCmdText
If zt = False Then
Adodc1.RecordSource = "select spname,spsl,zdkc from spkc WHERE DWS='" & gsname & "'"
Label1.Caption = "设置最低库存"
Label1.ForeColor = vbBlack
xpcmdbutton1.Caption = "设置"
Else
Adodc1.RecordSource = "select spname,spsl,zdkc from spkc where zdkc>0 and spsl<zdkc and DWS='" & gsname & "'"
Label1.Caption = "超低库存报警"
Label1.ForeColor = vbRed
xpcmdbutton1.Caption = "确定"
End If
Adodc1.Refresh
With MSH
.Cols = 3
.ColWidth(0) = 0.3 * .Width
.ColWidth(1) = 0.3 * .Width
.ColWidth(2) = 0.3 * .Width
.TextMatrix(0, 0) = "商品名称"
.TextMatrix(0, 1) = "库存数量"
.TextMatrix(0, 2) = "要求库存"
Do While Not Adodc1.Recordset.EOF
i = i + 1
If i > .Rows - 1 Then .Rows = .Rows + 1
.TextMatrix(i, 0) = Trim(Adodc1.Recordset.Fields(0).Value)
If IsNull(Adodc1.Recordset.Fields(1).Value) Then .TextMatrix(i, 1) = 0 Else .TextMatrix(i, 1) = Val(Adodc1.Recordset.Fields(1).Value)
If IsNull(Adodc1.Recordset.Fields(2).Value) Then .TextMatrix(i, 2) = 0 Else .TextMatrix(i, 2) = Val(Adodc1.Recordset.Fields(2).Value)
Adodc1.Recordset.MoveNext
Loop
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
tim = 0
zt = False
End Sub
Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
oldx = X
oldy = Y
mov = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If mov Then
Me.Move Me.Left + (X - oldx), Me.Top + (Y - oldy)
End If
End Sub
Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
mov = False
End Sub
Private Sub MSH_Click()
Text1.Visible = False
If mshrow > 0 And mshcol = 2 Then
With Text1
.Move MSH.Left + MSH.ColPos(2), MSH.Top + MSH.RowPos(mshrow), MSH.ColWidth(2), MSH.RowHeight(mshrow)
.Text = MSH.TextMatrix(mshrow, 2)
.BorderStyle = 1
.Visible = True
.SetFocus
End With
End If
End Sub
Private Sub MSH_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
mshrow = MSH.Row
mshcol = MSH.Col
End Sub
Private Sub Text1_Change()
MSH.TextMatrix(mshrow, 2) = Val(Text1.Text)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
MSH.TextMatrix(mshrow, 2) = Val(Text1.Text)
Text1.Visible = False
End If
End Sub
Private Sub xpcmdbutton1_Click()
tim = 0
If Trim(xpcmdbutton1.Caption) = "设置" Then
For i = 1 To MSH.Rows - 1
If Val(MSH.TextMatrix(i, 1)) > 0 Then
If rs.State Then rs.Close
rs.Open "update spkc set zdkc='" & Val(MSH.TextMatrix(i, 2)) & "' where spname='" & Trim(MSH.TextMatrix(i, 0)) & "' and dws='" & gsname & "'", cn, 3, 3
End If
Next
Unload Me
jczdkc
Else
Unload Me
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -