示例#1
0
        public JsonResult CustomerLogin()
        {
            string  userName   = Request["userName"].ToString();
            string  password   = Request["password"].ToString();
            int     rememberMe = Convert.ToInt32(Request["rememberMe"]);
            Contact customer;
            bool    result = _customerFactory.Login(out customer, userName, password);

            if (result)
            {
                Session["currentUser"] = customer;
                return(Json(new { result = 1 }));
            }
            else
            {
                return(Json(new { result = 0 }));
            }
        }