public static string logout() { string logoutUrl = "http://10.2.5.251:801/eportal/?c=Portal&a=logout&logout_method=1"; string result = new HttpLogin().GetResponse(logoutUrl); return(result); }
private void Logout_Click(object sender, EventArgs e) //注销 { string result = HttpLogin.logout(); Console.WriteLine(new HttpErr(result).ErrorMessage); CurrentMessage.Text = new HttpErr(result).ErrorMessage; }
public static string login(string uid, string pwd, string carrier) { string carrierCode = carrier.Equals("") ? carrier : ("%40" + carrier); string url = "http://10.2.5.251:801/eportal/?c=Portal&a=login&login_method=1&user_account=" + uid + carrierCode + "&user_password=" + pwd; string result = new HttpLogin().GetResponse(url); return(result); }
private void Login_Manual_Click(object sender, EventArgs e) //手动登录 { if (user == null) //user静态对象未加载实例化 { user = User.getInfo(); if (user == null) //Info文件不存在 { new Register().Show(); return; } } string result = HttpLogin.login(user.Uid, user.Pwd, user.Carrier); Console.WriteLine(new HttpErr(result).ErrorMessage);// CurrentMessage.Text = new HttpErr(result).ErrorMessage; }