📄 fee.frm
字号:
Top = 5745
Width = 1095
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户类型:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Index = 8
Left = 960
TabIndex = 22
Top = 2640
Width = 1200
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "电表倍数:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 960
TabIndex = 21
Top = 6720
Width = 1200
End
End
Begin CSCommand.Command cmdAsure
Height = 495
Left = 1680
TabIndex = 5
Top = 7560
Width = 975
_ExtentX = 1720
_ExtentY = 873
IconAlign = 0
Icon = "Fee.frx":0000
Caption = "确定修改"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command Command1
Height = 495
Left = 120
TabIndex = 4
Top = 7560
Width = 975
_ExtentX = 1720
_ExtentY = 873
IconAlign = 0
Icon = "Fee.frx":001C
Caption = "返回"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.TextBox txtUserName
Appearance = 0 'Flat
Height = 375
Index = 3
Left = 5280
TabIndex = 1
Top = 7560
Visible = 0 'False
Width = 1695
End
Begin VB.TextBox txtUserName
Appearance = 0 'Flat
Height = 375
Index = 6
Left = 5280
TabIndex = 0
Top = 7905
Visible = 0 'False
Width = 1695
End
Begin VB.PictureBox Picture1
BackColor = &H00C0C000&
BorderStyle = 0 'None
Height = 7335
Left = 0
Picture = "Fee.frx":0038
ScaleHeight = 7335
ScaleWidth = 1215
TabIndex = 34
Top = 0
Width = 1215
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "数据修改"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 240
Left = 120
TabIndex = 35
Top = 1080
Width = 1020
End
End
Begin VB.Label Label2
Caption = "照明占比(%)"
Height = 255
Index = 2
Left = 3840
TabIndex = 3
Top = 7680
Visible = 0 'False
Width = 1095
End
Begin VB.Label Label2
Caption = "营业电价(元/度)"
Height = 255
Index = 4
Left = 3840
TabIndex = 2
Top = 8040
Visible = 0 'False
Width = 1455
End
End
Attribute VB_Name = "frmEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim changeE As Double
Dim cEcount As Double
Private Sub cmdAsure_Click()
If Trim(MDIme.dcvalue.BoundText) <> "" Then
Dim cnn As New ADODB.Connection
Dim sqlAdd As String
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= " & DbPassword & " ;Data Source= " & _
App.Path & "\data\dbdb.mdb;Persist Security Info=False"
cnn.CursorLocation = adUseClient
cnn.Open
sqlAdd = "update panelinfo set holderid='" & txtUserName(0) & "',holder='" & txtUserName(1) & "',LEndPCode='" & txtUserName(2) & "',CopyDate=# " & dtpwdate.Value & "# ,lightscale=" & txtUserName(3) & ",lsfee=" & txtUserName(4) & ",lmoney=" & txtUserName(5) & ",bmoney=" & txtUserName(6) & ",cname='" & txtUserName(7) & "',memotext='" & txtUserName(8) & "',cEndCode=" & txtUserName(9) & ",cFeeMoney=" & Val(txtUserName(10)) & " ,nowecount=" & changeE & ",atimes=" & Me.Text1 & ""
sqlAdd = sqlAdd & " where holderid='" & Trim(MDIme.dcvalue.BoundText) & "'"
cnn.Execute sqlAdd
sqlAdd = "update 用户类型 set UNITPRICE=" & Me.txtUserName(5) & " where ATypeID=" & dcob用途.BoundText
cnn.Close
MsgBox " 数据修改完成! ", vbInformation
End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub dcob用途_Click(Area As Integer)
Dim rst As New ADODB.Recordset
If dcob用途.BoundText <> "" Then
rst.Open "select * from 用户类型 where ATypeID=" & dcob用途.BoundText & "", gCnn, adOpenStatic, adLockBatchOptimistic
Me.txtUserName(5) = Format(rst.Fields(2), "###0.00")
rst.Close
Else
MsgBox " 请先添加用户电表类型信息! ", vbInformation
Exit Sub
End If
End Sub
Private Sub Form_Load()
Dim rst As New ADODB.Recordset
Dim sqlEdit As String
sqlEdit = "select * from panelinfo "
sqlEdit = sqlEdit & " where holderid='" & Trim(MDIme.txtUserName(0)) & "' and delflag<>true "
rst.Open sqlEdit, gCnn, adOpenKeyset, adLockBatchOptimistic
If Not rst.EOF Then
txtUserName(0) = rst.Fields(1)
txtUserName(1) = rst.Fields(2)
txtUserName(2) = rst.Fields(3)
dtpwdate.Value = rst.Fields(4)
txtUserName(3) = Format(rst.Fields(5), "####0.00")
txtUserName(4) = Format(rst.Fields(6), "####0.00")
txtUserName(5) = Format(rst.Fields(7), "####0.00")
txtUserName(6) = Format(rst.Fields(8), "####0.00")
txtUserName(7) = rst.Fields(9)
txtUserName(8) = rst.Fields(10)
txtUserName(9) = rst.Fields!cendcode
Text1.Text = rst.Fields!Atimes
changeE = rst.Fields!cendcode
cEcount = rst.Fields!nowecount
If rst.Fields(14) <> Null Then
DTPicker1.Value = rst.Fields(14)
End If
txtUserName(10) = rst.Fields!cFeeMoney
End If
Dim rstJB As New ADODB.Recordset
Set rstJB.ActiveConnection = gCnn
rstJB.CursorLocation = adUseClient
rstJB.LockType = adLockBatchOptimistic
rstJB.CursorType = adOpenKeyset
rstJB.Open "select * from 用户类型 where atypeid=" & rst.Fields!AtypeID
Set dcob用途.DataSource = rstJB
Set dcob用途.RowSource = rstJB
dcob用途.BoundColumn = "ATYPEID"
dcob用途.ListField = "ATYPE"
If rstJB.RecordCount <> 0 Then
dcob用途.Text = rstJB.Fields(1)
Me.txtUserName(5) = Format(rstJB.Fields(2), "###0.00")
End If
rst.Close
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDIme.loadData (txtUserName(0))
End Sub
Private Sub txtUserName_Change(Index As Integer)
If Index = 9 Then
changeE = cEcount + (Val(txtUserName(9)) - changeE)
End If
End Sub
Private Sub UpDown1_Change()
Me.Text1 = UpDown1.Value
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -