public ActionResult Register(FormCollection data) { string username = data["username"]; string account = data["account"]; string password = data["password"]; MysqlController.SqlController sql = new MysqlController.SqlController(); ViewBag.Message = sql.Userregister(username, account, password); return(View()); }
public ActionResult Login(FormCollection data) { string account = data["account"]; string password = data["password"]; MysqlController.SqlController sql = new MysqlController.SqlController(); Array tempData = sql.Userlogin(account, password).Split(' '); ViewBag.Message = tempData.GetValue(0); Session.Add("username", tempData.GetValue(1)); return(View()); }