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

📄 frmreal.frm

📁 水电费收费管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmReal 
   Caption         =   "单户明细查询"
   ClientHeight    =   7665
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8715
   Icon            =   "frmreal.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   7665
   ScaleWidth      =   8715
   Begin MSFlexGridLib.MSFlexGrid msgRealData 
      Height          =   6585
      Left            =   570
      TabIndex        =   0
      Top             =   570
      Width           =   7860
      _ExtentX        =   13864
      _ExtentY        =   11615
      _Version        =   393216
      Cols            =   3
      FixedCols       =   0
      BackColorFixed  =   14737632
      BackColorBkg    =   16777215
      AllowUserResizing=   1
      Appearance      =   0
   End
End
Attribute VB_Name = "frmReal"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    Me.WindowState = vbMaximized
   
End Sub

Private Sub Form_Resize()
    On Error Resume Next
    With msgRealData
        .Top = 200
        .Width = Me.Width - 500
        .Height = Me.Height - 800
        .Left = 200
    End With
End Sub
Sub disuserdata(str1 As Integer)
On Error Resume Next
    Dim MYSET As New ADODB.Recordset
    Dim myset1 As New ADODB.Recordset
    Dim MyFeeset As New ADODB.Recordset
    Dim MyFeeSet1 As New ADODB.Recordset
    Dim strsql As String
    Dim sStart As Single, dStart As Date
    Dim sEnd As Single, dEnd As Date
    Dim MyChangeSet As Recordset
    Dim sPowerValue As Single, sTotalValue As Single, sTotalFee As Single
    Dim dChange As Date, I As Integer, u As Integer, j As Integer
    Dim CY As Single, CX As Single
    Dim CY1 As Single, CX1 As Single
    Dim CY2 As Single, CX2 As Single
    Dim CY3 As Single, CX3 As Single
    Dim MySet2 As Recordset
    Dim sTotalValue_D As Single
    Dim sTotalFee_D As Single
    Dim sTotalValue_Water As Single
    Dim sTotalFee_Water As Single
    Dim changestotalfee As Single
    
            
            With msgRealData
                .Clear
                .FormatString = "< 日   期 |< 楼     号 |<房   主|>上月表数|>本月表数|" & _
                            ">电 量|>单 价|>金   额|>上月表数|>本月表数|" & _
                            ">水量|>单价|>金  额|>合计金额|>应缴金额|"
                            
                .Rows = 1
                .Cols = 15
                strsql = "select * from userfee where userid1=" & str1
                strsql = strsql & " order by userid1,clloyear,cllomonth"
               MYSET.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
                Do Until MYSET.EOF
                    .Rows = .Rows + 1
                    .row = .Rows - 1
                    sTotalFee = 0
                   
                     strsql = "select * from user1 where userid1=" & MYSET("userid1")
                
               myset1.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
               
                If myset1.EOF Then
                     GoTo a:
                      
                    End If
                     .Col = 0
                     .Text = MYSET("clloyear") & "年" & MYSET("cllomonth") & "月"
                     
                     .Col = 1
                    .Text = myset1("louhaoid")
                    .Col = 2
                    .Text = myset1("name")
                    
                    
                    
a:                  strsql = "select * from datawork where userid1=" & _
                            MYSET("userid1") & _
                            " and clloyear=" & _
                            IIf(MYSET("cllomonth") = 12, MYSET("clloyear") + 1, MYSET("clloyear")) & " and cllomonth=" & _
                            IIf(MYSET("cllomonth") = 12, 1, MYSET("cllomonth") + 1)
                    MyFeeset.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
                    
                    If MyFeeset.EOF Then
                     GoTo e:
                      
                    End If
                    
                    
e:                    strsql = "select * from datawork where userid1=" & _
                            MYSET("userid1") & _
                           " and  clloyear=" & _
                            MYSET("clloyear") & _
                            " and cllomonth=" & MYSET("cllomonth")
                    MyFeeSet1.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
                    If MyFeeSet1.EOF Then
                      GoTo g:
                        
                    End If
g:
                    
                    .Col = 3
                    .Text = MyFeeSet1("elcmeter")
                    
                    .Col = 4
                    .Text = MyFeeset("elcmeter")
                    .Col = 5
                    .Text = MyFeeset("elcmeter") - MyFeeSet1("elcmeter")
                    
                     sTotalValue_D = sTotalValue_D + .Text
                     .Col = 6
                     .Text = Format(myset1("elcmeterfee"), "0.000")
                     
                    .Col = 7
                    .Text = Format((MyFeeset("elcmeter") - MyFeeSet1("elcmeter")) * myset1("elcmeterfee"), "0.0")
                     sTotalFee_D = sTotalFee_D + Val(.Text)
                     sTotalFee = Val(.Text)
                    .Col = 8
                    .Text = MyFeeSet1("watermeter")
                    .Col = 9
                    .Text = MyFeeset("watermeter")
                     .Col = 10
                    .Text = MyFeeset("watermeter") - MyFeeSet1("watermeter")
                     sTotalValue_Water = sTotalValue_Water + .Text
                     .Col = 11
                     .Text = Format(myset1("watermeterfee"), "0.0")
                     .Col = 12
                     .Text = Format((MyFeeset("watermeter") - MyFeeSet1("watermeter")) * myset1("watermeterfee"), "0.0")
                      sTotalFee = sTotalFee + Val(.Text)
                    sTotalFee_Water = sTotalFee_Water + Val(.Text)
                    .Col = 13
                    .Text = Format(sTotalFee, "0.0")
                    changestotalfee = Format(sTotalFee, "0.0")
                    .Col = 14
                    .Text = changedata(changestotalfee)
                     
                    strsql = " "
                    MyFeeset.Close
                    MyFeeSet1.Close
                   myset1.Close
                    MYSET.MoveNext
                    
                Loop
'
                  MYSET.Close
                .Rows = .Rows + 1
                .row = .Rows - 1
                .Col = 0: .Text = "合计"
                .Col = 5: .Text = Format(sTotalValue_D, , "0.0")
                .Col = 7: .Text = Format(sTotalFee_D, "0.0")
                .Col = 10: .Text = Format(sTotalValue_Water, "0")
                .Col = 12: .Text = Format(sTotalFee_Water, "0.0")
                .Col = 13: .Text = Format(sTotalFee_D + sTotalFee_Water, "0.0")
               
              
                
               
            End With
End Sub



⌨️ 快捷键说明

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