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

📄 frmadminmain.frm

📁 图书销售信息系统有毕业设计和源码在先进的计算机技术支持下
💻 FRM
📖 第 1 页 / 共 5 页
字号:
      End
      Begin VB.Menu MAdminT_year 
         Caption         =   "详细统计分析   "
      End
      Begin VB.Menu MAdminT_line2 
         Caption         =   "-"
      End
      Begin VB.Menu MAdminT_KuCun 
         Caption         =   "库存统计"
      End
   End
   Begin VB.Menu MAdmin_find 
      Caption         =   "图书检索(&F)"
      Begin VB.Menu MAdminF_bianHao 
         Caption         =   "按图书编号检索   "
      End
      Begin VB.Menu MAdminF_shuMing 
         Caption         =   "按书名检索"
      End
      Begin VB.Menu MAdminF_fenLei 
         Caption         =   "按分类检索"
      End
      Begin VB.Menu MAdminF_zuoZhe 
         Caption         =   "按作者检索"
      End
      Begin VB.Menu MAdminF_guanJianCi 
         Caption         =   "按关键词检索"
      End
      Begin VB.Menu MAdminF_line 
         Caption         =   "-"
      End
      Begin VB.Menu MAdminF_all 
         Caption         =   "浏览全部"
      End
      Begin VB.Menu MMadminB_line 
         Caption         =   "-"
      End
   End
   Begin VB.Menu MAdmin_BookShop 
      Caption         =   "图书馆情况(&B)"
      Begin VB.Menu MAdminB_jianJie 
         Caption         =   "图书简介   "
      End
      Begin VB.Menu MBj 
         Caption         =   "-"
      End
      Begin VB.Menu MB_JINshu 
         Caption         =   "进书记录"
      End
      Begin VB.Menu MAdminI_jianYi 
         Caption         =   "读者意见或建议   "
      End
   End
   Begin VB.Menu MAdmin_info 
      Caption         =   "读者反馈(&I)"
      Begin VB.Menu MAdminI_touSu 
         Caption         =   "读者投诉"
      End
      Begin VB.Menu MAdminI_line 
         Caption         =   "-"
      End
      Begin VB.Menu MAdminI_guanLi 
         Caption         =   "反馈信息管理   "
      End
   End
   Begin VB.Menu MAdmin_help 
      Caption         =   "系统帮助(&H)"
      Begin VB.Menu MAdminH_about 
         Caption         =   "关常德市职业中专图书管理系统...   "
      End
      Begin VB.Menu MAdminH_hlp 
         Caption         =   "帮助"
         Shortcut        =   {F1}
      End
      Begin VB.Menu MAdminH_line 
         Caption         =   "-"
      End
      Begin VB.Menu MAdminH_webHlp 
         Caption         =   "联机帮助"
      End
   End
End
Attribute VB_Name = "FrmAdminMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub searchBook(keyWords As String, fenLei As String)
Dim strSQL As String
SSTabGuest.Tab = 1
If keyWords = "" Then
    MsgBox "请输入检索的关键词!", vbOKOnly + vbExclamation, "图书检索"
    TxtKeyWords_Click
    Exit Sub
End If
If fenLei = "" Or fenLei = "选择分类" Then
    MsgBox "请输入检索的依据!", vbOKOnly + vbExclamation, "图书检索"
    ComboLeiBie.SetFocus
    Exit Sub
End If
On Error GoTo errEnd

strSQL = "select * from [读者查询] where [" & fenLei & "] like '%" & keyWords & "%'"

Adodc1.CommandType = adCmdText
Adodc1.RecordSource = strSQL
Adodc1.Refresh
Set DataGrid2.DataSource = Adodc1
DataGrid2.Refresh

If Adodc1.Recordset.RecordCount = 0 Then
    MsgBox "没有找到你要的相关记录!", vbOKOnly + vbInformation, "图书检索"
End If
LabResult.Caption = "共找到 " & Adodc1.Recordset.RecordCount & " 条相关记录"
Exit Sub

errEnd:
    MsgBox Err.Description, vbOKOnly + vbExclamation, "检索错误"
End Sub

Private Sub CmdOK_Click()
On Error GoTo errEnd

If ComboDengJi.Text = "" Or ComboDengJi.Text = "请选择会员级别" Then
    MsgBox "请选择会员级别!", vbOKOnly + vbExclamation, "会员标准"
    ComboDengJi.SetFocus
    Exit Sub
End If
If ComboJinE.Text = "" Or ComboJinE.Text = "金额" Then
    MsgBox "请选择该等级金额标准!", vbOKOnly + vbExclamation, "会员标准"
    ComboJinE.SetFocus
    Exit Sub
End If
If ComboDaZhe.Text = "" Or ComboDaZhe.Text = "请选择打折比率" Then
    MsgBox "请选择该等级打折比率!", vbOKOnly + vbExclamation, "会员标准"
    ComboDaZhe.SetFocus
    Exit Sub
End If
If CInt(ComboDaZhe.Text) <= 0 Or CInt(ComboDaZhe.Text) > 1 Then
    MsgBox "该等级打折比率制定有误!", vbOKOnly + vbExclamation, "会员标准"
    ComboDaZhe.SetFocus
    Exit Sub
End If
If TxtLiPin.Text = "" Then TxtLiPin.Text = "无"
If TxtQT.Text = "" Then TxtQT.Text = "无"

    Adodc2.Recordset!会员标准 = ComboJinE.Text
    Adodc2.Recordset!打折 = ComboDaZhe.Text
    Adodc2.Recordset!赠送礼品 = TxtLiPin.Text
    Adodc2.Recordset!备注 = TxtQT.Text
    Adodc2.Recordset.Update
    
    MsgBox "当前等级标准更新成功!", vbOKOnly + vbInformation, "会员政策"
    
Exit Sub

errEnd:
    MsgBox Err.Description, vbOKOnly + vbExclamation, "更新错误"
End Sub

Private Sub CmdReset_Click()
TxtName.Text = ""
TxtDanWei.Text = ""
TxtDiZhi.Text = ""
TxtEmail.Text = ""
TxtInfo.Text = ""
End Sub

Private Sub CmdSearch_Click()
Dim strSQL As String
If TxtKeyWords.Text = "" Or TxtKeyWords.Text = "关键词" Then
    MsgBox "请输入检索的关键词!", vbOKOnly + vbExclamation, "图书检索"
    TxtKeyWords_Click
    Exit Sub
End If
If ComboLeiBie.Text = "" Or ComboLeiBie.Text = "选择分类" Then
    MsgBox "请输入检索的依据!", vbOKOnly + vbExclamation, "图书检索"
    ComboLeiBie.SetFocus
    Exit Sub
End If
On Error GoTo errEnd

strSQL = "select * from [读者查询] where [" & ComboLeiBie.Text & "] like '%" & TxtKeyWords.Text & "%'"

Adodc1.CommandType = adCmdText
Adodc1.RecordSource = strSQL
Adodc1.Refresh
Set DataGrid2.DataSource = Adodc1
DataGrid2.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
    MsgBox "没有找到你要的相关记录", vbOKOnly + vbInformation, "图书检索"
End If
LabResult.Caption = "共找到 " & Adodc1.Recordset.RecordCount & " 条记录"
Exit Sub

errEnd:
    MsgBox Err.Description, vbOKOnly + vbExclamation, "检索错误"
End Sub

Private Sub CmdSet_Click()
On Error GoTo errEnd

    If TxtShopName.Text = "" Then
        MsgBox "请输入您的书店名称!", vbOKOnly + vbExclamation, "书店简介"
        TxtShopName.SetFocus
        Exit Sub
    End If
    If TxtShopJianJie.Text = "" Then
        MsgBox "请输入您的书店简介!", vbOKOnly + vbExclamation, "书店简介"
        TxtShopJianJie.SetFocus
        Exit Sub
    End If
    If TxtDianHua.Text = "" Then
        MsgBox "请输入您的电话!", vbOKOnly + vbExclamation, "书店简介"
        TxtDianHua.SetFocus
        Exit Sub
    End If
    If TxtShouJi.Text = "" Then
        TxtShouJi.Text = "无"
    End If
    If TxtMail.Text = "" Then
        TxtMail.Text = "无"
    End If
    If TxtLianXiRen.Text = "" Then
        MsgBox "请输入书店的联系人!", vbOKOnly + vbExclamation, "书店简介"
        TxtLianXiRen.SetFocus
        Exit Sub
    End If
    If TxtShopDiZhi.Text = "" Then
        MsgBox "请输入您的书店地址!", vbOKOnly + vbExclamation, "书店简介"
        TxtShopDiZhi.SetFocus
        Exit Sub
    End If
    If TxtShopWeb.Text = "" Then
        TxtShopWeb.Text = "无"
    End If
    If TxtQiT.Text = "" Then
        TxtQiT.Text = "无"
    End If
    
    Adodc1.Recordset!书店名称 = TxtShopName.Text
    Adodc1.Recordset!书店简介 = TxtShopJianJie.Text
    Adodc1.Recordset!电话 = TxtDianHua.Text
    Adodc1.Recordset!手机 = TxtShouJi.Text
    Adodc1.Recordset!电子邮件 = TxtMail.Text
    Adodc1.Recordset!联系人 = TxtLianXiRen.Text
    Adodc1.Recordset!地址 = TxtShopDiZhi.Text
    Adodc1.Recordset!网址 = TxtShopWeb.Text
    Adodc1.Recordset!备注 = TxtQiT.Text
    Adodc1.Recordset.Update
    
    MsgBox "书店简介更新成功!", vbOKOnly + vbInformation, "书店简介"
    
Exit Sub

errEnd:
    MsgBox Err.Description, vbOKOnly + vbExclamation, "数据库错误"
End Sub

Private Sub CmdSubmit_Click()
On Error GoTo errEnd

If TxtName.Text = "" Then
    MsgBox "请输入你的姓名!", vbOKOnly + vbExclamation, "信息反馈"
    TxtName.SetFocus
    Exit Sub
End If
If TxtDanWei.Text = "" Then
    TxtDanWei.Text = "未知"
End If
If TxtDiZhi.Text = "" Then
    TxtDiZhi.Text = "未知"
End If
If TxtEmail.Text = "" Then
    TxtEmail.Text = "未知"
End If
If TxtInfo.Text = "" Then
    MsgBox "请填写反馈信息!", vbOKOnly + vbExclamation, "信息反馈"
    TxtInfo.SetFocus
    Exit Sub
End If

Adodc1.Recordset.AddNew
Adodc1.Recordset!姓名 = TxtName.Text
Adodc1.Recordset!身份 = UserShenFen
If SexMan.Value Then
    Adodc1.Recordset!性别 = "男"
Else
    Adodc1.Recordset!性别 = "女"
End If
Adodc1.Recordset!单位 = TxtDanWei.Text
Adodc1.Recordset!地址 = TxtDiZhi.Text
Adodc1.Recordset!电子邮件 = TxtEmail.Text
Adodc1.Recordset!反馈信息 = TxtInfo.Text
Adodc1.Recordset!反馈日期 = Now
Adodc1.Recordset.Update

MsgBox "感谢你的意见或建议!", vbOKOnly + vbInformation, "信息反馈"
Call CmdReset_Click

Exit Sub

errEnd:
    MsgBox Err.Description, vbOKOnly + vbExclamation, "数据库错误"
End Sub

Private Sub ComboDengJi_Click()
If ComboDengJi.Text <> "请选择会员级别" Then
    Adodc2.CommandType = adCmdText
    Adodc2.RecordSource = "select * from [会员政策] where [会员级别]=""" & ComboDengJi.Text & """"
    Adodc2.Refresh
    
    If Adodc2.Recordset.RecordCount > 0 Then
        Adodc2.Recordset.MoveFirst
        ComboJinE.Clear
        ComboJinE.Text = Adodc2.Recordset!会员标准 & ""
        ComboDaZhe.Clear
        ComboDaZhe.Text = Adodc2.Recordset!打折 & ""
        TxtLiPin.Text = Adodc2.Recordset!赠送礼品 & ""
        TxtQT.Text = Adodc2.Recordset!备注 & ""
        
        ComboJinE.AddItem "100"
        ComboJinE.AddItem "200"
        ComboJinE.AddItem "300"
        ComboJinE.AddItem "400"
        ComboJinE.AddItem "500"
    
        ComboDaZhe.AddItem "0.95"
        ComboDaZhe.AddItem "0.9"
        ComboDaZhe.AddItem "0.85"
        ComboDaZhe.AddItem "0.8"
        ComboDaZhe.AddItem "0.75"
        ComboDaZhe.AddItem "0.6"
        ComboDaZhe.AddItem "0.5"
        ComboDaZhe.AddItem "0.3"
    Else
        MsgBox "数据丢失!请与程序员联系!", vbOKOnly + vbExclamation, "数据库错误"
    End If
End If
End Sub

Private Sub Form_Activate()
Call Form_Resize
SSTabGuest.Tab = 0
Adodc1.CommandType = adCmdTable
Adodc1.RecordSource = "读者查询"

Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
End Sub

Private Sub Form_Load()
Dim dbName As String
Dim connSTR As String

On Error GoTo errEnd

dbName = App.Path
If Right(dbName, 1) <> "\" Then dbName = dbName + "\"
dbName = dbName + "DataBase\WFSSDataBase.mdb"

connSTR = "Provider=Microsoft.Jet.OLEDB.4.0;Data S

⌨️ 快捷键说明

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