毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

VB电表管理信息系统 第9页

更新时间:2010-4-5:  来源:毕业论文
VB电表管理信息系统 第9页
FileCopy "" & Text1.Text & "", "" & a & "计费系统数据库.mdb"
Dim llp
llp = MsgBox("数据导入成功", vbOKOnly, "提示")
End If
Exit Sub
errhandle:
MsgBox "出现错误,不能复制", vbOKOnly + vbCritical, "复制文件"
End Sub

Private Sub Command2_Click()
dy
Unload Me
End Sub


Private Sub Dir1_Change()
If Right(Dir1.Path, 1) <> "\" Then
Text1.Text = Dir1.Path + "\"
Else
Text1.Text = Dir1.Path
End If
File1.Path = Dir1.Path
End Sub

Private Sub Drive1_Change()

If Drive1.Drive = "a:" Then
MsgBox "不能从A盘导入"
Exit Sub
End If

Dir1.Path = Drive1.Drive
End Sub

Private Sub File1_Click()
Text1.Text = Text1.Text + File1.filename
Command1.Enabled = True
End Sub

Private Sub Form_Activate()
gCnn.Close
Command1.Enabled = False
'Text1.Text = "c:\"
Text1.Text = CurDir()
Text1.Enabled = False
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
dy
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
If gCnn.State = 0 Then
 gCnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:database password= " & DbPassword & " ;Data Source= " & _
    App.Path & "\data\dbdb.mdb;Persist Security Info=False"
    gCnn.CursorLocation = adUseClient
    gCnn.Open
End If
MDIme.loadAdd
End Sub
7. 数据删除界面设计:
 数据删除代码设计:
Private Sub cmdAsure_Click()
  If MsgBox("  你确定要删除该数据吗? ", vbInformation + vbYesNo) <> vbYes Then
    Exit Sub
  End If
 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 delflag=true"
        sqlAdd = sqlAdd & " where holderid='" & Trim(MDIme.dcvalue.BoundText) & "'"
       
        cnn.Execute sqlAdd
        cnn.Close
        MsgBox " 数据删除完成! ", vbInformation
    End If
End Sub

Private Sub Command1_Click()
For i = 0 To 10
    If i <> 9 Then
        MDIme.txtUserName(i) = ""
    End If
Next
MDIme.dcNum = ""
MDIme.dcvalue = ""
Unload Me
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) = rst.Fields(5)
    txtUserName(4) = Format(rst.Fields(6), "####0.00")
    txtUserName(5) = Format(rst.Fields(7), "####0.00")
    txtUserName(6) = rst.Fields(8)
    txtUserName(7) = rst.Fields(9)
    txtUserName(8) = rst.Fields(10)
    txtUserName(9) = rst.Fields!cendcode
    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  

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

VB电表管理信息系统 第9页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。