public static Apq.STReturn Regist(string LoginName, string LoginPwd, string Introducer) { string CryptPwd = Apq.Security.Cryptography.DESHelper.EncryptString(LoginPwd, DES.Key, DES.IV); IPAddress ipa; IPAddress.TryParse(HttpContext.Current.Request.UserHostAddress, out ipa); pdbp.WS.Login Lg = new pdbp.WS.Login(); pdbp.WS.STReturn stReturnWS = Lg.WS_Reg(LoginName, CryptPwd, ipa.GetAddressBytes(), Introducer); Apq.STReturn stReturn = new Apq.STReturn(); stReturn.NReturn = stReturnWS.NReturn; stReturn.FNReturn = stReturnWS.FNReturn; stReturn.ExMsg = stReturnWS.ExMsg; stReturn.POuts.AddRange(stReturnWS.POuts); if (stReturn.NReturn == 1) { // 注册成功,自动登录 wsLogin wsLogin = new wsLogin(); wsLogin.Login_LoginName(LoginName, LoginPwd); } return stReturn; }
public static Apq.STReturn Regist(string LoginName, string LoginPwd, string Introducer) { string CryptPwd = Apq.Security.Cryptography.DESHelper.EncryptString(LoginPwd, DES.Key, DES.IV); IPAddress ipa; IPAddress.TryParse(HttpContext.Current.Request.UserHostAddress, out ipa); pdbp.WS.Login Lg = new pdbp.WS.Login(); pdbp.WS.STReturn stReturnWS = Lg.WS_Reg(LoginName, CryptPwd, ipa.GetAddressBytes(), Introducer); Apq.STReturn stReturn = new Apq.STReturn(); stReturn.NReturn = stReturnWS.NReturn; stReturn.FNReturn = stReturnWS.FNReturn; stReturn.ExMsg = stReturnWS.ExMsg; stReturn.POuts.AddRange(stReturnWS.POuts); if (stReturn.NReturn == 1) { // 注册成功,自动登录 wsLogin wsLogin = new wsLogin(); wsLogin.Login_LoginName(LoginName, LoginPwd); } return(stReturn); }