Beispiel #1
0
        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());
        }
Beispiel #2
0
        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());
        }