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

📄 frmpayffood.frm

📁 一个小型管理系统.~!!不同的用户拥有不同的权限
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmPayFFood 
   Caption         =   "编辑结款信息"
   ClientHeight    =   5520
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9435
   LinkTopic       =   "Form1"
   ScaleHeight     =   5520
   ScaleWidth      =   9435
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "关闭"
      Height          =   495
      Left            =   7200
      TabIndex        =   7
      Top             =   4320
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "结款"
      Height          =   495
      Left            =   5400
      TabIndex        =   6
      Top             =   4320
      Width           =   1455
   End
   Begin VB.Frame Frame2 
      Caption         =   "就餐信息"
      Height          =   3135
      Left            =   120
      TabIndex        =   4
      Top             =   1080
      Width           =   9255
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   2535
         Left            =   120
         TabIndex        =   5
         Top             =   360
         Width           =   9015
         _ExtentX        =   15901
         _ExtentY        =   4471
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "桌台信息"
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   9255
      Begin MSAdodcLib.Adodc Adodc2 
         Height          =   330
         Left            =   4800
         Top             =   720
         Visible         =   0   'False
         Width           =   1575
         _ExtentX        =   2778
         _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         =   "Adodc2"
         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.ComboBox ComboRate 
         Height          =   300
         ItemData        =   "FrmPayFFood.frx":0000
         Left            =   7440
         List            =   "FrmPayFFood.frx":002B
         TabIndex        =   17
         Text            =   "100"
         Top             =   480
         Width           =   855
      End
      Begin VB.CommandButton Command3 
         Caption         =   "显示消费详情"
         Height          =   375
         Left            =   360
         TabIndex        =   9
         Top             =   720
         Visible         =   0   'False
         Width           =   1455
      End
      Begin VB.TextBox TxtCid 
         Height          =   375
         Left            =   720
         TabIndex        =   8
         Top             =   360
         Width           =   2535
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   1800
         Top             =   720
         Visible         =   0   'False
         Width           =   2295
         _ExtentX        =   4048
         _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.Label Label14 
         AutoSize        =   -1  'True
         Caption         =   "折扣(%)"
         Height          =   180
         Left            =   5760
         TabIndex        =   16
         Top             =   480
         Width           =   810
      End
      Begin VB.Label Label5 
         Caption         =   "LblTotal"
         DataField       =   "总价"
         Height          =   375
         Left            =   7440
         TabIndex        =   15
         Top             =   120
         Width           =   1695
      End
      Begin VB.Label Label2 
         Caption         =   "消费总金额:"
         Height          =   375
         Left            =   5760
         TabIndex        =   14
         Top             =   120
         Width           =   1455
      End
      Begin VB.Label LblTabel 
         Caption         =   "LblTabel"
         Height          =   255
         Left            =   4080
         TabIndex        =   3
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "桌号:"
         Height          =   255
         Left            =   3360
         TabIndex        =   2
         Top             =   360
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "编号:"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   495
      End
   End
   Begin VB.Label Label19 
      AutoSize        =   -1  'True
      Caption         =   "收款日期;"
      Height          =   180
      Left            =   3120
      TabIndex        =   13
      Top             =   4560
      Width           =   810
   End
   Begin VB.Label lblOptDate 
      AutoSize        =   -1  'True
      Caption         =   "lblOptDate"
      Height          =   180
      Left            =   4080
      TabIndex        =   12
      Top             =   4560
      Width           =   900
   End
   Begin VB.Label lblEmpName 
      AutoSize        =   -1  'True
      Caption         =   "lblEmpName"
      Height          =   180
      Left            =   1200
      TabIndex        =   11
      Top             =   4560
      Width           =   900
   End
   Begin VB.Label Label17 
      AutoSize        =   -1  'True
      Caption         =   "操作人员:"
      Height          =   180
      Left            =   240
      TabIndex        =   10
      Top             =   4560
      Width           =   810
   End
End
Attribute VB_Name = "FrmPayFFood"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub ComboRate_Click()
Cal_Total
End Sub

Private Sub Command1_Click()
  SqlStmt = "Update Eat_Cost Set CostMoney = " + Label5.Caption _
           + " ,CostTime = '" + lblOptDate.Caption + "'" _
           + " ,Status = 1" _
           + " ,UserName = '" + lblEmpName.Caption + "'" _
           + " where CostID = '" + Trim(txtCid.Text) + "'"
  SQLExt (SqlStmt)
  Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Refresh_PayFFood()
  
  '设置ADO控件的数据源
  Adodc1.ConnectionString = Conn
  If txtCid.Text = "" Then
   Adodc1.RecordSource = "select * from Eat_Food"
  Else
   Adodc1.RecordSource = "select a.FoodName as 食品名称,a.FoodNum as 食品数量,b.Price as 单价,(a.FoodNum * b.Price) as 小结 from Eat_Food as a,Food as b where a.FoodNo=b.FoodNo and a.CostID='" + Trim(txtCid.Text) + "'"
  End If

  Adodc1.Refresh
  Set DataGrid1.DataSource = Adodc1
  DataGrid1.Columns(0).Width = 2000
  DataGrid1.Columns(1).Width = 1000
  DataGrid1.Columns(2).Width = 1000
  DataGrid1.Columns(3).Width = 1000
End Sub


Private Sub Form_Activate()
 Refresh_PayFFood
 Cal_Total
End Sub

Private Sub Form_Load()
  lblEmpName = CurUser.EmpName
  lblOptDate = Date
End Sub

Private Sub Cal_Total()
  Adodc2.ConnectionString = Conn
  Adodc2.RecordSource = "select sum(SumCost.小结) as 总价 from (select (a.FoodNum * b.Price) as 小结 from Eat_Food as a,Food as b where a.FoodNo=b.FoodNo and a.CostID='" + Trim(txtCid.Text) + "'" + ") AS SumCost"
  Adodc2.Refresh
  Label5.Caption = Round(Adodc2.Recordset.Fields(0) * Val(ComboRate) / 100, 0)
End Sub

⌨️ 快捷键说明

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