📄 ywgl.frm
字号:
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
Picture = "ywgl.frx":1AA0
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Picture = "ywgl.frx":1EF4
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
Alignment = 1
TextSave = "2003-10-19"
EndProperty
BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
Alignment = 2
TextSave = "20:31"
EndProperty
EndProperty
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "日期输入格式为:(YYYY-MM-DD(年-月-日)"
ForeColor = &H000000FF&
Height = 180
Left = 11640
TabIndex = 18
Top = 600
Width = 3330
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
X1 = 0
X2 = 15240
Y1 = 0
Y2 = 0
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "河南金升科技发展有限公司销售业务信息查询系统"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 435
Index = 1
Left = 1905
TabIndex = 2
Top = 120
Width = 9915
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "河南金升科技发展有限公司销售业务信息查询系统"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 435
Index = 0
Left = 1935
TabIndex = 1
Top = 135
Width = 9915
End
Begin VB.Menu tmenu
Caption = "系统命令[&S]"
Begin VB.Menu cpsw
Caption = "更改密码 (&C)"
Shortcut = ^C
End
Begin VB.Menu csh
Caption = "初始化 (&I)"
Shortcut = ^I
End
End
Begin VB.Menu insm
Caption = "软件介绍"
End
End
Attribute VB_Name = "input"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
With Data1.Recordset
If Not .EOF Then
.MoveLast
.AddNew
.Update
.MoveLast
.Edit
Else
.AddNew
.Update
.MoveLast
.Edit
End If
End With
End Sub
Private Sub Command11_Click()
Data1.RecordSource = "select * from yw"
Data1.Refresh
End Sub
Private Sub Command2_Click()
YesNo = MsgBox("真的要删除该业务信息吗?", vbYesNo + vbQuestion, "确认删除否?")
If YesNo = vbYes And Data1.Recordset.RecordCount <> 0 Then
Data1.Recordset.Delete
Data1.Recordset.MoveLast
DBGrid1.Refresh
Else
MsgBox "已删除完了!"
End If
End Sub
Private Sub Command3_Click()
Data1.Recordset.MoveFirst
End Sub
Private Sub Command4_Click()
Data1.Recordset.MoveLast
End Sub
Private Sub Command5_Click()
Dim sj As Double
Dim jj As Double
Dim xsl As Double
With Data1.Recordset
If .RecordCount = 0 Then Exit Sub
.MoveFirst
Do While Not .EOF
sj = sj + .Fields("售价").Value * .Fields("销售量").Value
jj = jj + .Fields("进价").Value * .Fields("销售量").Value
xsl = xsl + .Fields("销售量").Value
.MoveNext
Loop
End With
Data1.Refresh
xbbox = MsgBox("统计结果:" & vbCrLf & "__________________________" & vbCrLf & vbCrLf & "销售量:" & Str(xsl) & vbCrLf & "售价之和:" & Str(sj) & "元" & " " & vbCrLf & "进价之和:" & Str(jj) & "元" & " " & vbCrLf & "毛 利 为:" & Str(sj - jj) & "元 " & vbCrLf & "_________________________" & vbCrLf, 64, "统计结果")
End Sub
Private Sub Command6_Click()
Dim sj As Double
Dim jj As Double
Dim xsl As Double
Dim lrl As Double
With Data1.Recordset
If .RecordCount = 0 Then Exit Sub
.MoveFirst
Do While Not .EOF
sj = sj + .Fields("售价").Value * .Fields("销售量").Value
jj = jj + .Fields("进价").Value * .Fields("销售量").Value
xsl = xsl + .Fields("销售量").Value
.MoveNext
Loop
End With
lrl = (sj - jj) / jj
If lrl < 1 Then
If lrl < 0 Then
MsgBox "毛利率为:" + Left$(Str(lrl), 5) + "%"
Else
MsgBox "毛利率为:" + Mid$(Str(lrl), 3, 2) + "%"
End If
Else
MsgBox "毛利率为:" + Mid$(Str(lrl), 1, 4) + "%"
End If
End Sub
Private Sub Command7_Click()
Data1.RecordSource = "select * from yw where 业务员='" & DBCombo1.Text & "'"
Data1.Refresh
End Sub
Private Sub Command8_Click()
Data1.RecordSource = "select * from yw where 商品名称='" & DBCombo2.Text & "'"
Data1.Refresh
End Sub
Private Sub Command9_Click()
Data1.RecordSource = "select * from yw where 日期>=#" & Text1.Text & "# and 日期<=#" & Text2.Text & "#"
On Error GoTo g
Data1.Refresh
g:
MsgBox "如果日期为空或输入格式不正确,会影响查找结果,正确格式如2003-08-22!"
End Sub
Private Sub cpsw_Click()
f:
Dim npsw1 As String
Dim npsw2 As String
npsw1 = InputBox("请输入你要改变的新密码!", "变更密码")
npsw2 = InputBox("请再次输入你要改变的新密码!", "确认变改密码")
If npsw2 = npsw1 Then
SaveSetting "pws", "pws", "pws", npsw1
MsgBox "密码变更成功,您的新密码是:" + npsw1
Else
MsgBox "两次密码输入不一致,请重新输入!"
End If
If npsw2 = "" Or npsw1 = "" Then
MsgBox "密码不能为空!"
GoTo f
End If
End Sub
Private Sub csh_Click()
intf.Show vbModal
End Sub
Private Sub DBGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
DBCombo1.Top = DBGrid1.Top + 200 + DBGrid1.Row * DBGrid1.RowHeight
DBCombo2.Top = DBGrid1.Top + 200 + DBGrid1.Row * DBGrid1.RowHeight
DBCombo3.Top = DBGrid1.Top + 200 + DBGrid1.Row * DBGrid1.RowHeight
End Sub
Private Sub insm_Click()
Ins.Show vbModal
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -