各种学习资料
PrivateSubCommand1_Click()
rtn=SetWindowPos(Me.hwnd,-2,0,0,0,0,3)'运用API函数SetWindowPos,来实现取消窗体置前的功能
OnErrorResumeNext
DimMPasswordAsString
IfText2.Text="mr"AndText1.Text="mingrisoft"Then'判断是否使用的是超级口令登录
frm_main.StatusBar1.Panels.Item(2).Text="当前操作员:mr"
Name1=Text2.Text
UnloadMe
frm_main.Show
Else
Adodc1.RecordSource="select*fromtb_enterwhereM_Name='"&Text2.Text&"'"
Adodc1.Refresh
IfAdodc1.Recordset.RecordCount>0Then
MPassword=Adodc1.Recordset.Fields("M_Password")
IfText1.Text=MPasswordThen'判断数据的密码是否正
确
frm_main.StatusBar1.Panels.Item(2).Text="当前操作员:"+
Adodc1.Recordset.Fields("M_Name")
Name1=Text2.Text
frm_main.Show
'添加登录日志
Open(App.Path&"\系统日志.ini")ForInputAs#1
DoWhileNotEOF(1)
LineInput#1,Intext
TStr=TStr+Intext+Chr(13)+Chr(10)
Loop
Close#1
TStr=TStr+""+Name1+""+Format(Now,
"yyyy-mm-ddhh:mm:ss")+""+"系统登录"+Chr(13)+Chr(10)
Open(App.Path&"\系统日志.ini")ForOutputAs#1
Print#1,TStr
Close#1
UnloadMe
Else
MsgBox"密码不正确,请您确认后重新输入",,"库存管理系统"
Text1.Text=""
Text1.SetFocus
EndIf
Else
MsgBox"对不起没有此用户的信息",,"仓储信息管理系统"
Text2.Text=""
Text1.Text=""
EndIf
EndIf
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库物流管理专业毕业论文(13)在线全文阅读。
相关推荐: