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

📄 formbmftc.frm

📁 这是一个人事管理软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column07 
         DataField       =   "wcm"
         Caption         =   "晚餐金额"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column08 
         DataField       =   "yc"
         Caption         =   "夜餐次数"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column09 
         DataField       =   "ycm"
         Caption         =   "夜餐金额"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column10 
         DataField       =   "cm"
         Caption         =   "合计金额"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column11 
         DataField       =   "ftname"
         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 
            ColumnWidth     =   884.976
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1349.858
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   764.787
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   854.929
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   810.142
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   794.835
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   854.929
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   810.142
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   824.882
         EndProperty
         BeginProperty Column10 
            ColumnWidth     =   824.882
         EndProperty
         BeginProperty Column11 
            ColumnWidth     =   1094.74
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adcbmftc 
      Height          =   330
      Left            =   2760
      Top             =   4320
      Visible         =   0   'False
      Width           =   2175
      _ExtentX        =   3836
      _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         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "bmftc"
      Caption         =   "Adcbmftc"
      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.CommandButton Command6 
      Caption         =   "打印"
      Height          =   375
      Left            =   3120
      TabIndex        =   5
      Top             =   4800
      Width           =   975
   End
   Begin VB.CommandButton Command3 
      Caption         =   "返回"
      Height          =   375
      Left            =   5280
      TabIndex        =   4
      Top             =   4800
      Width           =   735
   End
   Begin VB.CommandButton Command4 
      Caption         =   "清空数据"
      Height          =   375
      Left            =   4080
      TabIndex        =   3
      Top             =   4800
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "打印预览"
      Height          =   375
      Left            =   1800
      TabIndex        =   2
      Top             =   4800
      Width           =   1335
   End
   Begin VB.TextBox Textmonth 
      Height          =   270
      Left            =   1560
      TabIndex        =   0
      Top             =   360
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "选择餐厅"
      Height          =   255
      Left            =   3000
      TabIndex        =   8
      Top             =   360
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "报表处理月份 "
      Height          =   255
      Left            =   480
      TabIndex        =   1
      Top             =   360
      Width           =   1095
   End
End
Attribute VB_Name = "Formbmftc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim vbmid, vbmname, vxc, vxcm, vzc, vzcm, vyc, vycm, vwc, vwcm, vcm, vcmonth
Dim cxc, czc, cwc, cyc, cmc, vftname, varrid
Dim vdate, vyear As String

Private Sub Command1_Click()
If Textmonth.Text = "" Then
MsgBox ("请输入月份")
Else
vcmonth = CInt(Textmonth.Text)
vyear = Year(Date)
vdate = vyear & "-" & vcmonth
Adcbm.RecordSource = "select * from tbm where bmid<>''"
Adcbm.Refresh
cxc = 0
czc = 0
cwc = 0
cyc = 0
cmc = 0
Do While Not Adcbm.Recordset.EOF
vbmid = Adcbm.Recordset.Fields("bmid").Value
vbmname = Adcbm.Recordset.Fields("bmname").Value
Adcftcount.RecordSource = "select * from ftcount where bmid='" & vbmid & "'and kmonth='" & vdate & "'and arrid='" & varrid & "'"
Adcftcount.Refresh
vxc = 0
vxcm = 0
vzc = 0
vzcm = 0
vwc = 0
vwcm = 0
vyc = 0
vycm = 0
vcm = 0
Do While Not Adcftcount.Recordset.EOF
vxc = vxc + Adcftcount.Recordset.Fields("xgf").Value + Adcftcount.Recordset.Fields("xzf").Value
vzc = vxc + Adcftcount.Recordset.Fields("zgf").Value + Adcftcount.Recordset.Fields("zzf").Value
vwc = vxc + Adcftcount.Recordset.Fields("wgf").Value + Adcftcount.Recordset.Fields("wzf").Value
vyc = vxc + Adcftcount.Recordset.Fields("ygf").Value + Adcftcount.Recordset.Fields("yzf").Value
Adcftcount.Recordset.MoveNext
Loop
vcm = (vxc + vzc + vwc + vyc) * 3
Adcbmftc.RecordSource = "select * from bmftc where bmid='" & vbmid & "'and ftname='" & vftname & "'"
Adcbmftc.Refresh
If Adcbmftc.Recordset.EOF Then
Adcbmftc.Recordset.AddNew
If vxc <> 0 Then
Adcbmftc.Recordset.Fields("xc").Value = Round(vxc, 2)
Adcbmftc.Recordset.Fields("xcm").Value = Round(vxc * 3, 2)
End If
If vzc <> 0 Then
Adcbmftc.Recordset.Fields("zc").Value = Round(vzc, 2)
Adcbmftc.Recordset.Fields("zcm").Value = Round(vzc * 3, 2)
End If
If vyc <> 0 Then
Adcbmftc.Recordset.Fields("yc").Value = Round(vyc, 2)
Adcbmftc.Recordset.Fields("ycm").Value = Round(vyc * 3, 2)
End If
If vwc <> 0 Then
Adcbmftc.Recordset.Fields("wc").Value = Round(vwc, 2)
Adcbmftc.Recordset.Fields("wcm").Value = Round(vwc * 3, 2)
End If
If vcm <> 0 Then
Adcbmftc.Recordset.Fields("cm").Value = vcm
End If
Adcbmftc.Recordset.Fields("cmonth").Value = vcmonth
Adcbmftc.Recordset.Fields("bmid").Value = vbmid
Adcbmftc.Recordset.Fields("bmname").Value = vbmname
Adcbmftc.Recordset.Fields("ftname").Value = vftname
Adcbmftc.Recordset.update
End If
cxc = cxc + vxc
czc = czc + vzc
cwc = cwc + vwc
cyc = cyc + vyc
cmc = cmc + vcm
Adcbm.Recordset.MoveNext
Loop
Adcbmftc.Recordset.AddNew
Adcbmftc.Recordset.Fields("cmonth").Value = vcmonth
Adcbmftc.Recordset.Fields("bmid").Value = "本月"
Adcbmftc.Recordset.Fields("bmname").Value = "合计"
Adcbmftc.Recordset.Fields("xc").Value = Round(cxc, 2)
Adcbmftc.Recordset.Fields("xcm").Value = Round(cxc * 3, 2)
Adcbmftc.Recordset.Fields("zc").Value = Round(czc, 2)
Adcbmftc.Recordset.Fields("zcm").Value = Round(czc * 3, 2)
Adcbmftc.Recordset.Fields("wc").Value = Round(cwc, 2)
Adcbmftc.Recordset.Fields("wcm").Value = Round(cwc * 3, 2)
Adcbmftc.Recordset.Fields("yc").Value = Round(cyc, 2)
Adcbmftc.Recordset.Fields("ycm").Value = Round(cyc * 3, 2)
Adcbmftc.Recordset.Fields("cm").Value = cmc
Adcbmftc.Recordset.Fields("ftname").Value = vftname
Adcbmftc.Recordset.update
End If
Adcbmftc.RecordSource = "select * from bmftc "
Adcbmftc.Refresh

End Sub

Private Sub Command2_Click()
CRep1.Action = 0
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Command4_Click()
Adcbmftc.RecordSource = " select * from bmftc where bmid<>''"
Adcbmftc.Refresh
Do While Not Adcbmftc.Recordset.EOF And Not Adcbmftc.Recordset.BOF
Adcbmftc.Recordset.Delete
Adcbmftc.Recordset.update
Adcbmftc.Recordset.MoveNext
If Adcbmftc.Recordset.EOF Or Adcbmftc.Recordset.BOF Then
Exit Do
End If
Loop
End Sub

Private Sub Command6_Click()
CRep2.Action = 0
End Sub


Private Sub DCb1_Click(Area As Integer)
vftname = DCb1.Text
Adodc1.RecordSource = "select * from ftset where ftname='" & vftname & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
varrid = Adodc1.Recordset.Fields("arrid").Value
End If
End Sub

Private Sub Form_Load()
vftname = DCb1.Text
Adodc1.RecordSource = "select * from ftset where ftname='" & vftname & "'"
Adodc1.Refresh
If Not Adodc1.Recordset.EOF Then
varrid = Adodc1.Recordset.Fields("arrid").Value
End If

End Sub

⌨️ 快捷键说明

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