Exemple #1
0
 // GET: Account
 public ActionResult Index(string username, string pass)
 {
     CheckLogin.Service wc = new CheckLogin.Service();
     if (wc.CheckLogin(username, pass))
     {
         Response.Write("ok");
         return(View("Welcome"));
     }
     else
     {
         Response.Write("not ok");
         return(View());
     }
 }
Exemple #2
0
        public ActionResult About(string user, string pass)
        {
            CheckLogin.Service check = new CheckLogin.Service();

            if (check.CheckLogin(user, pass))
            {
                string   account = check.getAccount(user).ToString();
                string[] acc     = account.Split('#');
                ViewBag.Code    = acc[0];
                ViewBag.Name    = acc[2];
                ViewBag.Current = acc[3];
                return(View("Welcome"));
            }
            else
            {
                ViewBag.Message = "dang nhap  khong thanh cong";
            }

            return(View("index"));
        }