关闭

关闭

关闭

封号提示

内容

首页 登陆页面.doc

登陆页面.doc

登陆页面.doc

上传者: 断了弦旳情_ 2017-09-25 评分 0 0 0 0 0 0 暂无简介 简介 举报

简介:本文档为《登陆页面doc》,可适用于IT/计算机领域,主题内容包含登陆页面usingSystemusingSystemCollectionsGenericusingSystemLinqusingSystemWebu符等。

登陆页面usingSystemusingSystemCollectionsGenericusingSystemLinqusingSystemWebusingSystemWebUIusingSystemWebUIWebControlsusingSystemTextusingCXESModelusingCXESBLLpublicpartialclassMain:SystemWebUIMasterPage{privatestringmsg=""privateList<FunctionsInfo>functionsprivatereadonlystringLoginURL="LoginPageaspx"privatereadonlystringSessionUserInfo="SessionUserInfo"privatereadonlystringSessionUserType="SessionUserType"privateDictionaryManagerdicManager=newDictionaryManager()privateSystemUsersManagersuManager=newSystemUsersManager()privateSystemParametersManagerspManager=newSystemParametersManager()privateFunctionsManagerfuncManager=newFunctionsManager()privateAdminsManageradminsManager=newAdminsManager()protectedvoidPageLoad(objectsender,EventArgse){boolhaveSession=HaveSession()if(haveSession){if(!CheckSystemIsOpen()){inttype=ConvertToInt(SessionSessionUserType)if(type!=){PageClientScriptRegisterStartupScript(thisGetType(),"it","<script>alert('ϵÍÔÝΪÅ')<script>")foreach(SystemWebUIControlobjControlinthisControls){if(objControlisSystemWebUIHtmlControlsHtmlForm){foreach(SystemWebUIControlobjHtmlControlinobjControlControls){SystemWebUIWebControlsWebControlobjWebConobjWebCon=objHtmlControlasWebControlif(objWebCon!=){objWebConEnabled=false}}}}return}}}if(!IsPostBack){UpdateDLL()if(!haveSession){thistxtLoginIdEnabled=truethistxtLoginPWDEnabled=truethisbtnLoginEnabled=truethisddlUserTypeEnabled=truethisbtnResetEnabled=falsethisbtnResetVisible=falseif(RequestUrlToString()Substring(RequestUrlToString()LastIndexOf(''))!=LoginURL){ResponseRedirect(LoginURL)}return}thistxtLoginIdEnabled=falsethistxtLoginPWDEnabled=falsethisbtnLoginEnabled=falsethisddlUserTypeEnabled=falsethistxtLoginIdVisible=falsethistxtLoginPWDVisible=falsethisbtnLoginVisible=falsethisbtnResetEnabled=trueintuserType=ConvertToInt(SessionSessionUserType)if(userType!=){SystemUsersInfouser=SessionSessionUserInfoasSystemUsersInfothisltUserInfoText=user=="εÇÂ":userLoginIdthisddlUserTypeSelectedValue=userTypeToString()}else{AdminsInfoadmin=SessionSessionUserInfoasAdminsInfothisltUserInfoText=admin=="εÇÂ":adminLoginIdthisddlUserTypeSelectedValue=userTypeToString()}UpdateTree()}}#regionÖúprivateboolCheckSystemIsOpen(){returnspManagerCheckSystemIsOpen()}privateboolHaveSession(){returnSessionSessionUserInfo==||SessionSessionUserType==false:true}privatevoidUpdateDLL(){List<DictionaryInfo>dics=dicManagerGetDictionaryInfoByGroupName("UserType")thisddlUserTypeDataSource=dicsthisddlUserTypeDataTextField="Content"thisddlUserTypeDataValueField="DicId"thisddlUserTypeDataBind()}privateboolCheckLogin(SystemUsersInfouser){returnsuManagerCheckLogin(user,refmsg)}privatevoidUpdateTree(){intuserType=ConvertToInt(SessionSessionUserType)if(userType==){functions=funcManagerGetAllInfo()UpdateNodes()}else{SystemUsersInfouser=SessionSessionUserInfoasSystemUsersInfoif(user!=){functions=funcManagerGetFunctionsByLoginId(userLoginId)UpdateNodes()}}}privatevoidUpdateNodes(){foreach(FunctionsInfoiteminfunctionsWhere(p=>pFId==)){TreeNodefather=newTreeNode()fatherValue=itemFunctionIdToString()fatherText=itemDescribefatherNavigateUrl=itemURLUpdateChildNodes(father)thistvPowerNodesAdd(father)}}privatevoidUpdateChildNodes(TreeNodefather){foreach(FunctionsInfoiteminfunctionsWhere(p=>pFId==ConvertToInt(fatherValue))){TreeNodechild=newTreeNode()childValue=itemFunctionIdToString()childText=itemDescribechildNavigateUrl=itemURLUpdateChildNodes(child)fatherChildNodesAdd(child)}}#endregionprotectedvoidbtnLoginClick(objectsender,EventArgse){if(thistxtLoginIdTextTrim()==""||thistxtLoginPWDText==""){PageClientScriptRegisterStartupScript(thisGetType(),"it","<script>alert('ÓÃÃûºÍÃÜÂëÄÜΪÕ')<script>")return}if(ConvertToInt(thisddlUserTypeSelectedValue)!=){SystemUsersInfouser=newSystemUsersInfo()userLoginId=thistxtLoginIdTextTrim()userLoginPWD=thistxtLoginPWDTextuserUserType=ConvertToInt(thisddlUserTypeSelectedValue)if(!CheckLogin(user)){PageClientScriptRegisterStartupScript(thisGetType(),"it",stringFormat("<script>alert('{}')<script>",msg))return}else{userLastLoginTime=SystemDateTimeNowuserState=suManagerUpdateStateLastLoginTime(user)SessionSessionUserInfo=userSessionSessionUserType=userUserTypeResponseRedirect("MainPageaspx")}}else{AdminsInfoadmin=newAdminsInfo()adminLoginId=thistxtLoginIdTextTrim()adminLoginPWD=thistxtLoginPWDTextif(!adminsManagerCheckLogin(admin,refmsg)){PageClientScriptRegisterStartupScript(thisGetType(),"it",stringFormat("<script>alert('{}')<script>",msg))return}else{SessionSessionUserInfo=adminSessionSessionUserType=thisddlUserTypeSelectedValueResponseRedirect("MainPageaspx")}}}protectedvoidbtnResetClick(objectsender,EventArgse){SessionSessionUserInfo=SessionSessionUserType=thistvPowerNodesClear()ResponseRedirect("LoginPageaspx")}}

用户评论(0)

0/200

精彩专题

上传我的资料

每篇奖励 +2积分

资料评价:

/10
0下载券 下载 加入VIP, 送下载券

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部