@{ Layout = null;} <! DOCTYPE html>
</div></body>
Public Resultmessage Login ()
{ String account = String. empty; String Password = string. empty; String Key = string. empty; if (request["Account"]! = null && request["account"]. ToString () = "") { Accoun T = request["account"]. ToString (); } if (request["Password"]! = Null && request["Password"]. ToString () = "") { PASSWO RD = request["Password"]. ToString (); } if (request["Key"]! = NULL && request["Key"]. ToString ()! = "") &NBSp { key = request["Key"]. ToString (); } Resultmessage Resultmessag E = new Brg.Global.Common.ResultMessage (); Base_usermodel Base_usermodel = new Ba Se_usermodel (); Base_usermodel.account = account; &NBS P Base_usermodel.password = password; base_usermodel.enabled = 1; &nbs P Base_usermodel.deletemark = 0; if (Key = = Configurati onmanager.appsettings["Key"]) { & nbsp Base_usermodel list = Base_operabpl.queryobject (Base_usermodel); T ry &NBsp { if (list! = null) { s Tring Oproleidstr = configurationmanager.appsettings["Oproleid"];//from the Web. config configuration & nbsp if (true)//oproleidstr.contains (convert.tostring (list. Roleid) = = true { String optid = list. Account.tostring ();//Get current login id String getpwd = Brg.Global.Common.Common.Md5Encrypt (Base_usermodel.password);//password encryption if (getpwd = = list. Password) { resultmessage = new ResU Ltmessage (True, "1", 1, list); and nbsp } else &NBSP ; { &N Bsp //Password error &NBS P resultmessage = new Resultmessage (False, "3"); } &NBSP } &N Bsp else { &NBSP ; resultmessage = new Resultmessage (False, "4"); } & nbsp } else &NBSP ; { &N Bsp Login error No this login resultmessage = new ResU Ltmessage (False, "2"); } & NBsp } catch (Exception ex) &NB Sp { Commonbpl.addlog (1, "Login "," "," Brgservice/uptongservice/loginservice.cs/login "," Public resultmessage Login (string context) ", ex. ToString (), ""); resultmessage = new Resultmessage (FA LSE, ex. Message); } } else { &NBS P Resultmessage = new Resultmessage (false, "please pass in the correct security Code"); } &NBS P httpcontext.response.appendheader ("Access-control-allow-origin", "*"); return Resultmessage; }
ASP-cross-domain method two