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

📄 main_rcyw_kcyj.frm

📁 是基于C#语言的一个图书综合管理系统的开发案例,相当实用
💻 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"
Begin VB.Form main_rcyw_kcyj 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "图书管理-【库存预警】"
   ClientHeight    =   3555
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8130
   Icon            =   "main_rcyw_kcyj.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3555
   ScaleWidth      =   8130
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   705
      Top             =   4515
      Visible         =   0   'False
      Width           =   1920
      _ExtentX        =   3387
      _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 VB.OptionButton Option2 
      Caption         =   "库存下限预警"
      Height          =   375
      Left            =   5310
      TabIndex        =   3
      Top             =   3225
      Width           =   1530
   End
   Begin VB.OptionButton Option1 
      Caption         =   "库存上限预警"
      Height          =   360
      Left            =   3750
      TabIndex        =   2
      Top             =   3240
      Width           =   1425
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&E 退出"
      Height          =   375
      Left            =   7140
      TabIndex        =   1
      Top             =   3165
      Width           =   975
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1 
      Bindings        =   "main_rcyw_kcyj.frx":0CCA
      Height          =   3045
      Left            =   15
      TabIndex        =   0
      Top             =   45
      Width           =   8100
      _ExtentX        =   14288
      _ExtentY        =   5371
      _Version        =   393216
      BackColor       =   12713963
      ForeColor       =   0
      Cols            =   15
      BackColorSel    =   8388608
      _NumberOfBands  =   1
      _Band(0).Cols   =   15
      _Band(0)._NumMapCols=   14
      _Band(0)._MapCol(0)._Name=   "书号"
      _Band(0)._MapCol(0)._RSIndex=   0
      _Band(0)._MapCol(1)._Name=   "条形码"
      _Band(0)._MapCol(1)._RSIndex=   1
      _Band(0)._MapCol(2)._Name=   "书名"
      _Band(0)._MapCol(2)._RSIndex=   2
      _Band(0)._MapCol(3)._Name=   "作者"
      _Band(0)._MapCol(3)._RSIndex=   3
      _Band(0)._MapCol(4)._Name=   "出版社"
      _Band(0)._MapCol(4)._RSIndex=   4
      _Band(0)._MapCol(5)._Name=   "图书类别"
      _Band(0)._MapCol(5)._RSIndex=   5
      _Band(0)._MapCol(6)._Name=   "存放位置"
      _Band(0)._MapCol(6)._RSIndex=   6
      _Band(0)._MapCol(7)._Name=   "图书总数"
      _Band(0)._MapCol(7)._RSIndex=   7
      _Band(0)._MapCol(7)._Alignment=   7
      _Band(0)._MapCol(8)._Name=   "单价"
      _Band(0)._MapCol(8)._RSIndex=   8
      _Band(0)._MapCol(8)._Alignment=   7
      _Band(0)._MapCol(9)._Name=   "现存数量"
      _Band(0)._MapCol(9)._RSIndex=   9
      _Band(0)._MapCol(9)._Alignment=   7
      _Band(0)._MapCol(10)._Name=   "金额"
      _Band(0)._MapCol(10)._RSIndex=   10
      _Band(0)._MapCol(10)._Alignment=   7
      _Band(0)._MapCol(11)._Name=   "借出次数"
      _Band(0)._MapCol(11)._RSIndex=   11
      _Band(0)._MapCol(11)._Alignment=   7
      _Band(0)._MapCol(12)._Name=   "库存上限"
      _Band(0)._MapCol(12)._RSIndex=   12
      _Band(0)._MapCol(12)._Alignment=   7
      _Band(0)._MapCol(13)._Name=   "库存下限"
      _Band(0)._MapCol(13)._RSIndex=   13
      _Band(0)._MapCol(13)._Alignment=   7
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FF8080&
      Caption         =   "Label2"
      Height          =   795
      Left            =   1755
      TabIndex        =   5
      Top             =   1755
      Width           =   2985
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "提示:被预警的图书请马上销售或进货!"
      ForeColor       =   &H000000FF&
      Height          =   330
      Left            =   75
      TabIndex        =   4
      Top             =   3285
      Width           =   3720
   End
End
Attribute VB_Name = "main_rcyw_kcyj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Number()     '声明一个显示MSHFlexGrid1表格行号的过程
 If Adodc1.Recordset.RecordCount > 0 Then    '当记录数大于零
    Dim i As Integer
    For i = 1 To Adodc1.Recordset.RecordCount
        MSHFlexGrid1.TextMatrix(i, 0) = i   '赋值给MSHFlexGrid控件
    Next i
 End If
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "DSN=NBooks"
Adodc1.RecordSource = "select * from kcb"
Adodc1.Refresh
 '查询库存信息,并按【书号】升序排序
 Adodc1.RecordSource = "select * from kcb"
 Adodc1.Refresh
 Call Number
 '设置MSHFlexGrid1的列宽
 With MSHFlexGrid1
     .ColWidth(0) = 400
     .ColWidth(1) = 800
     .ColWidth(2) = 800
     .ColWidth(3) = 2000
     .ColWidth(4) = 600
     .ColWidth(5) = 800
     For i = 6 To 9
         .ColWidth(i) = 0
     Next i
     .ColWidth(10) = 800
     .ColWidth(11) = 0
     .ColWidth(12) = 0
     .ColWidth(13) = 800
     .ColWidth(14) = 800
 End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
 frm_main.Enabled = True
End Sub

Private Sub Option1_Click()   '库存上限预警
 If Option1.Value = True Then
    '查询库存信息中【现存数量】大于【库存上限】的记录,并按【书号】升序排序
    Adodc1.RecordSource = "select * from kcb where 现存数量>库存上限 order by 书号"
    Adodc1.Refresh
    MSHFlexGrid1.ColWidth(14) = 0
    MSHFlexGrid1.ColWidth(13) = 800
    MSHFlexGrid1.ColWidth(3) = 2780
    '设置MSHFlexGrid1表格第10列的背景色为蓝色
    MSHFlexGrid1.Col = 10
    For i = 1 To Adodc1.Recordset.RecordCount
        MSHFlexGrid1.Row = i
        MSHFlexGrid1.CellBackColor = &HFF8080  '设置颜色
    Next i
    Call Number
 End If
End Sub
Private Sub Option2_Click()  '库存下线预警
 If Option2.Value = True Then
    '查询库存信息中【现存数量】小于【库存下限】的记录,并按【书号】升序排序
    Adodc1.RecordSource = "select * from kcb where 现存数量<库存下限 order by 书号"
    Adodc1.Refresh
    MSHFlexGrid1.ColWidth(13) = 0
    MSHFlexGrid1.ColWidth(14) = 800
    MSHFlexGrid1.ColWidth(3) = 2780
    '设置MSHFlexGrid1表格第10列的背景色为红色
    For i = 1 To Adodc1.Recordset.RecordCount
        MSHFlexGrid1.Col = 10
        MSHFlexGrid1.Row = i
        MSHFlexGrid1.CellBackColor = &HFF&
    Next i
    Call Number
 End If
End Sub
Private Sub Command1_Click()  '退出
 frm_main.Enabled = True
 Unload Me
End Sub

⌨️ 快捷键说明

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