⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.frm

📁 这是本人的毕业设计 超市管理信息系统 完整的毕业论文
💻 FRM
📖 第 1 页 / 共 2 页
字号:
   frmBuyall.Command4.Enabled = False
   frmBuyall.Command5.Enabled = False
   frmBuyall.Command6.Enabled = False
   frmBuyall.Command7.Enabled = False
   frmBuyall.Command8.Enabled = False
   rs_buy.Close

   Exit Sub
End If
rs_buy.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商进货总金额 from buy where 进货年=" & inty & " and 进货月=" & intm & "and 进货日=" & intd & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc5.RecordSource = strfctotal
frmBuyall.Adodc5.Refresh
frmBuyall.DataGrid5.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 进货总金额 from buy where 进货年=" & inty & " and 进货月=" & intm & "and 进货日=" & intd & ""
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmBuyall.Text1.Text = rs_total.Fields("进货总金额")
rs_total.Close
'frmMain.Show
End Sub

Private Sub mnBuyYear_Click()
frmBuyall.Text4.Enabled = False
frmBuyall.SSTab1.Tab = 3
frmBuyall.SSTab1.TabEnabled(0) = False
frmBuyall.SSTab1.TabEnabled(1) = False
frmBuyall.SSTab1.TabEnabled(2) = False
frmBuyall.SSTab1.TabEnabled(3) = True
frmBuyall.Show
strbuy = "select * from buy where 进货年=" & inty & " "
rs_buy.Open strbuy, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc4.RecordSource = strbuy
frmBuyall.Adodc4.Refresh
frmBuyall.DataGrid4.ReBind
If rs_buy.EOF = True Then
   frmBuyall.Adodc8.RecordSource = strbuy
   frmBuyall.Adodc8.Refresh
   frmBuyall.DataGrid8.ReBind
   MsgBox "您今年没有进货记录!", vbOKOnly + vbInformation, "注意"
   frmBuyall.Command25.Enabled = False
   frmBuyall.Command26.Enabled = False
   frmBuyall.Command27.Enabled = False
   frmBuyall.Command28.Enabled = False
   frmBuyall.Command29.Enabled = False
   frmBuyall.Command30.Enabled = False
   frmBuyall.Command31.Enabled = False
   frmBuyall.Command32.Enabled = False
   rs_buy.Close
   
   Exit Sub
End If
rs_buy.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商进货总金额 from buy where 进货年=" & inty & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc8.RecordSource = strfctotal
frmBuyall.Adodc8.Refresh
frmBuyall.DataGrid8.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 进货总金额 from buy where 进货年=" & inty & " "
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmBuyall.Text4.Text = rs_total.Fields("进货总金额")
rs_total.Close

End Sub

Private Sub mnChangeEmployee_Click()
cnn.Close
frmLogin.Show
Unload Me
End Sub

Private Sub mnChangePwd_Click()
frmChangePwd.Show
End Sub

Private Sub mnEmployeeTable_Click()
frmEmployeeTable.Show
End Sub

Private Sub mnExit_Click()
cnn.Close
Unload Me
End Sub

Private Sub mnGoodsTable_Click()
frmShowGoodstable.Show
End Sub

Private Sub mnlogin_Click()
frmLogin.Show
End Sub


Private Sub mnManufacturerTable_Click()
frmManufacturerTable.Show
End Sub

Private Sub mnRetreat_Click()
frmRetreatgoods.Show
End Sub

Private Sub mnRetreatTable_Click()
frmRetreatTable.Show
End Sub

Private Sub mnSell_Click()
frmSellgoods.Show
End Sub

Private Sub mnSellMonth_Click()
frmSellall.SSTab1.Tab = 1
frmSellall.Text2.Enabled = False
frmSellall.SSTab1.TabEnabled(0) = False
frmSellall.SSTab1.TabEnabled(1) = True
frmSellall.SSTab1.TabEnabled(2) = False
frmSellall.SSTab1.TabEnabled(3) = False
frmSellall.Show
strsell = "select * from sell where 销售年=" & inty & " and 销售月=" & intm & " "
rs_sell.Open strsell, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc2.RecordSource = strsell
frmSellall.Adodc2.Refresh
frmSellall.DataGrid2.ReBind
If rs_sell.EOF = True Then
   frmSellall.Adodc6.RecordSource = strsell
   frmSellall.Adodc6.Refresh
   frmSellall.DataGrid6.ReBind
   MsgBox "您本月没有销售记录!", vbOKOnly + vbInformation, "注意"
   frmSellall.Command9.Enabled = False
   frmSellall.Command10.Enabled = False
   frmSellall.Command11.Enabled = False
   frmSellall.Command12.Enabled = False
   frmSellall.Command13.Enabled = False
   frmSellall.Command14.Enabled = False
   frmSellall.Command15.Enabled = False
   frmSellall.Command16.Enabled = False
   rs_sell.Close
   
   Exit Sub
End If
rs_sell.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商销售总金额 from sell where 销售年=" & inty & " and 销售月=" & intm & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc6.RecordSource = strfctotal
frmSellall.Adodc6.Refresh
frmSellall.DataGrid6.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 销售总金额 from sell where 销售年=" & inty & " and 销售月=" & intm & " "
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmSellall.Text2.Text = rs_total.Fields("销售总金额")
rs_total.Close

End Sub

Private Sub mnSellQuarterly_Click()
frmSellall.SSTab1.Tab = 2
frmSellall.Text3.Enabled = False
frmSellall.SSTab1.TabEnabled(0) = False
frmSellall.SSTab1.TabEnabled(1) = False
frmSellall.SSTab1.TabEnabled(2) = True
frmSellall.SSTab1.TabEnabled(3) = False
frmSellall.Show
Select Case intm
       Case Is < 4
            intm = 3
       Case Is < 7
            intm = 6
       Case Is < 10
            intm = 9
       Case Is > 10
            intm = 12
End Select
strsell = "select * from sell where 销售年=" & inty & " and 销售月 between " & (intm - 2) & " and " & intm & " "
rs_sell.Open strsell, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc2.RecordSource = strsell
frmSellall.Adodc2.Refresh
frmSellall.DataGrid2.ReBind
If rs_sell.EOF = True Then
   frmSellall.Adodc6.RecordSource = strsell
   frmSellall.Adodc6.Refresh
   frmSellall.DataGrid6.ReBind
   MsgBox "您本季度没有销售记录!", vbOKOnly + vbInformation, "注意"
   frmSellall.Command17.Enabled = False
   frmSellall.Command18.Enabled = False
   frmSellall.Command19.Enabled = False
   frmSellall.Command20.Enabled = False
   frmSellall.Command21.Enabled = False
   frmSellall.Command22.Enabled = False
   frmSellall.Command23.Enabled = False
   frmSellall.Command24.Enabled = False
   rs_sell.Close
 
   Exit Sub
End If
rs_sell.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商销售总金额 from sell where 销售年=" & inty & " and 销售月 between " & (intm - 2) & " and " & intm & "  group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc6.RecordSource = strfctotal
frmSellall.Adodc6.Refresh
frmSellall.DataGrid6.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 销售总金额 from sell where 销售年=" & inty & " and 销售月 between " & (intm - 2) & " and " & intm & " "
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmSellall.Text3.Text = rs_total.Fields("销售总金额")
rs_total.Close

intm = Month(Date)
End Sub

Private Sub mnSellTable_Click()
frmSellTable.Show
End Sub

Private Sub mnSellToday_Click()
frmSellall.SSTab1.Tab = 0
frmSellall.Text1.Enabled = False
frmSellall.SSTab1.TabEnabled(0) = True
frmSellall.SSTab1.TabEnabled(1) = False
frmSellall.SSTab1.TabEnabled(2) = False
frmSellall.SSTab1.TabEnabled(3) = False
frmSellall.Show
strsell = "select * from sell where 销售年=" & inty & " and 销售月=" & intm & " and 销售日=" & intd & " "
rs_sell.Open strsell, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc1.RecordSource = strsell
frmSellall.Adodc1.Refresh
frmSellall.DataGrid1.ReBind
If rs_sell.EOF = True Then
   frmSellall.Adodc5.RecordSource = strsell
   frmSellall.Adodc5.Refresh
   frmSellall.DataGrid5.ReBind
   MsgBox "您今日没有销售记录!", vbOKOnly + vbInformation, "注意"
   frmSellall.Command1.Enabled = False
   frmSellall.Command2.Enabled = False
   frmSellall.Command3.Enabled = False
   frmSellall.Command4.Enabled = False
   frmSellall.Command5.Enabled = False
   frmSellall.Command6.Enabled = False
   frmSellall.Command7.Enabled = False
   frmSellall.Command8.Enabled = False
   rs_sell.Close
 
   Exit Sub
End If
rs_sell.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商销售总金额 from sell where 销售年=" & inty & " and 销售月=" & intm & "and 销售日=" & intd & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc5.RecordSource = strfctotal
frmSellall.Adodc5.Refresh
frmSellall.DataGrid5.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 销售总金额 from sell where 销售年=" & inty & " and 销售月=" & intm & "and 销售日=" & intd & ""
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmSellall.Text1.Text = rs_total.Fields("销售总金额")
rs_total.Close

End Sub

Private Sub mnSellYear_Click()
frmSellall.Text4.Enabled = False
frmSellall.SSTab1.Tab = 3
frmSellall.SSTab1.TabEnabled(0) = False
frmSellall.SSTab1.TabEnabled(1) = False
frmSellall.SSTab1.TabEnabled(2) = False
frmSellall.SSTab1.TabEnabled(3) = True
frmSellall.Show
strsell = "select * from sell where 销售年=" & inty & " "
rs_sell.Open strsell, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc4.RecordSource = strsell
frmSellall.Adodc4.Refresh
frmSellall.DataGrid4.ReBind
If rs_sell.EOF = True Then
   frmSellall.Adodc8.RecordSource = strsell
   frmSellall.Adodc8.Refresh
   frmSellall.DataGrid8.ReBind
   MsgBox "您今年没有销售记录!", vbOKOnly + vbInformation, "注意"
   frmSellall.Command25.Enabled = False
   frmSellall.Command26.Enabled = False
   frmSellall.Command27.Enabled = False
   frmSellall.Command28.Enabled = False
   frmSellall.Command29.Enabled = False
   frmSellall.Command30.Enabled = False
   frmSellall.Command31.Enabled = False
   frmSellall.Command32.Enabled = False
   rs_sell.Close
   
   Exit Sub
End If
rs_sell.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商销售总金额 from sell where 销售年=" & inty & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmSellall.Adodc8.RecordSource = strfctotal
frmSellall.Adodc8.Refresh
frmSellall.DataGrid8.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 销售总金额 from sell where 销售年=" & inty & " "
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmSellall.Text4.Text = rs_total.Fields("销售总金额")
rs_total.Close

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -