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

📄 frmgoodsall.frm

📁 一个简单的快餐店收银软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         ImageHeight     =   16
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   28
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":2D9C
               Key             =   "sz"
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":3136
               Key             =   "dy"
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":34D0
               Key             =   "yl"
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":386A
               Key             =   "xz"
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":3C04
               Key             =   "xg"
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":3F9E
               Key             =   "sc"
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":4338
               Key             =   "zh"
            EndProperty
            BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":46D2
               Key             =   "sh"
            EndProperty
            BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":4A6C
               Key             =   "bc"
            EndProperty
            BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":4E06
               Key             =   "fq"
            EndProperty
            BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":51A0
               Key             =   "check"
            EndProperty
            BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":553A
               Key             =   "qs"
            EndProperty
            BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":58D4
               Key             =   "fullcheck"
            EndProperty
            BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":5C6E
               Key             =   "qq"
            EndProperty
            BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":6008
               Key             =   "first"
            EndProperty
            BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":63A2
               Key             =   "prev"
            EndProperty
            BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":673C
               Key             =   "next"
            EndProperty
            BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":6AD6
               Key             =   "last"
            EndProperty
            BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":6E70
               Key             =   "bz"
            EndProperty
            BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":720A
               Key             =   "sx"
            EndProperty
            BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":75A4
               Key             =   "tc"
            EndProperty
            BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":793E
               Key             =   "bcgs"
            EndProperty
            BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":7CD8
               Key             =   "mrlk"
            EndProperty
            BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":8072
               Key             =   "xsxm"
            EndProperty
            BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":840C
               Key             =   "cx"
            EndProperty
            BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":87A6
               Key             =   "dj"
            EndProperty
            BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":8B40
               Key             =   "gb"
            EndProperty
            BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "frmGoodsAll.frx":8EDA
               Key             =   "dk"
            EndProperty
         EndProperty
      End
      Begin MSHierarchicalFlexGridLib.MSHFlexGrid mshfView 
         Height          =   6765
         Left            =   120
         TabIndex        =   14
         Top             =   480
         Width           =   11115
         _ExtentX        =   19606
         _ExtentY        =   11933
         _Version        =   393216
         Rows            =   30
         Cols            =   8
         BackColorFixed  =   -2147483629
         ForeColorFixed  =   0
         BackColorSel    =   8388608
         ForeColorSel    =   16777215
         BackColorBkg    =   16777215
         BackColorUnpopulated=   16777215
         GridColor       =   32768
         GridColorFixed  =   32768
         GridColorUnpopulated=   32768
         FocusRect       =   0
         FillStyle       =   1
         SelectionMode   =   1
         AllowUserResizing=   2
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty FontFixed {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _NumberOfBands  =   1
         _Band(0).Cols   =   8
      End
   End
End
Attribute VB_Name = "frmGoodsAll"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAddBill_Click()
If GetUserRights(gUserID, "增加物资编码总表") = False Then
    MsgBox "用户权限不够!", vbInformation, "警告"
    Exit Sub
End If

TableState = "增加"
frmGoodsSub.Caption = "商品编码" & " - [增加]"
frmGoodsSub.Show
End Sub

Private Sub cmdDelete_Click()
If GetUserRights(gUserID, "删除物资编码总表") = False Then
    MsgBox "用户权限不够!", vbInformation, "警告"
    Exit Sub
End If

If MsgBox("确定要删除当前编号 [" & frmGoodsAll.mshfView.TextMatrix(frmGoodsAll.mshfView.RowSel, 1) & "] 吗?", vbQuestion + vbOKCancel, "提示窗口") = vbOK Then
    sSQL = "delete from Goods where gCode='" & Trim(frmGoodsAll.mshfView.TextMatrix(frmGoodsAll.mshfView.RowSel, 1)) & "'"
    Conn.Execute sSQL
    '显示数据
    sSQL = "SELECT Goods.gCode, Goods.gName, Goods.gModel, Goods.gUnits, Goods.gPrice, Goods.gPriceCost, Goods.gRemark"
    sSQL = sSQL & " from Goods"
    sSQL = sSQL & " order by gcode asc"
    Me.lblTotal = ShowData(sSQL, mshfView, 30)

End If
End Sub

Private Sub cmdEdit_Click()
If GetUserRights(gUserID, "修改物资编码总表") = False Then
    MsgBox "用户权限不够!", vbInformation, "警告"
    Exit Sub
End If

TableState = "修改"
frmGoodsSub.Caption = "商品编码" & " - [修改]"
frmGoodsSub.Show
End Sub

Private Sub cmdQuery_Click()
TableState = "显示"
frmGoodsSub.Caption = "商品编码" & " - [显示]"
frmGoodsSub.cmdSave.Visible = False
frmGoodsSub.picTable.Enabled = False
frmGoodsSub.Show
End Sub

Private Sub cmdQueryGoods_Click()
'frmGAQuery.Show 1
frmGoodsAllQuery.Show 1
End Sub

Private Sub cmdReflesh_Click()
'显示数据
sSQL = "SELECT Goods.gCode, Goods.gName, Goods.gModel, Goods.gUnits, Goods.gPrice, Goods.gPriceCost, Goods.gRemark"
sSQL = sSQL & " from Goods"
sSQL = sSQL & " order by gcode asc"
Me.lblTotal = ShowData(sSQL, mshfView, 30)

End Sub

Private Sub mshfView_DblClick()
'显示
Call cmdQuery_Click
End Sub

Private Sub Form_Load()
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2 + 80
'初始化MSHFVIEW格式
Call Setcaption(Me.mshfView, "序号;物资编码;商品名称;规格型号;计量单位;单价;成本价格;备注;")
With mshfView
    .ColWidth(0) = 255 * 2
    .ColWidth(1) = 255 * 4
    .ColWidth(2) = 255 * 8
    .ColWidth(3) = 255 * 6
    .ColWidth(4) = 255 * 3.5
    .ColWidth(5) = 255 * 4
    .ColWidth(6) = 255 * 4
    .ColWidth(7) = 255 * 8
    .ColAlignment(1) = 1
    .ColAlignment(2) = 1
    .ColAlignment(3) = 1
    .ColAlignment(4) = 1
    .ColAlignment(5) = 1
End With

'显示数据
sSQL = "SELECT Goods.gCode, Goods.gName, Goods.gModel, Goods.gUnits, Goods.gPrice, Goods.gPriceCost, Goods.gRemark"
sSQL = sSQL & " from Goods"
sSQL = sSQL & " order by gcode asc"
Me.lblTotal = ShowData(sSQL, mshfView, 30)

'置当前状态
TableState = "显示"
Me.cmbDeptName.Clear
Me.cmbDeptName.AddItem "当前表:商品编码总表"
Me.cmbDeptName.ListIndex = 0

End Sub

Private Sub Form_Resize()
If Me.WindowState <> 1 Then
    Me.picLeft.Height = Me.Height - Me.picLeft.Top - 500
    Me.sstBody.Width = Me.Width - Me.sstBody.Left - 250
    Me.sstBody.Height = Me.Height - Me.picButtom.Height - Me.cmbDeptName.Height - 800
    
    Me.mshfView.Width = Me.sstBody.Width - 300
    Me.mshfView.Height = Me.sstBody.Height - Me.picButtom2.Height - 700
    
    Me.picButtom2.Top = Me.mshfView.Height + Me.mshfView.Top + 100
    
    Me.picButtom.Width = Me.Width - Me.picButtom.Left - 250
    
    Me.picButtom.Top = Me.sstBody.Top + Me.sstBody.Height + 110
    Me.txtInput.Width = Me.picButtom.Width - Me.txtInput.Left - 50
    
    Me.cmbDeptName.Width = Me.Width - Me.cmbDeptName.Left - 250
End If
End Sub

Private Sub mshfView_GotFocus()
    Oldwinproc = GetWindowLong(Me.hWnd, GWL_WNDPROC)
    SetWindowLong Me.hWnd, GWL_WNDPROC, AddressOf FlexScroll
End Sub
'将下列代码写到表格控件的LostFocus事件中
Private Sub mshfView_LostFocus()
    SetWindowLong Me.hWnd, GWL_WNDPROC, Oldwinproc
End Sub

⌨️ 快捷键说明

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