Пример #1
0
        public ActionResult mainLogin(string loginName, string loginPassword)
        {
            var Jcon = new JsonContainer();
            var objUserAccountHelper = new UserAccountHelper();
            var dt = objUserAccountHelper.SelectUserByLoginDetails(loginName, loginPassword);

            if (dt.Rows.Count <= 0)
            {
                Jcon.Result = -1;
                return(Json(Jcon));
            }

            Session["userId"] = long.Parse(dt.Rows[0]["userId"].ToString());

            Jcon.Result = 1;
            return(Json(Jcon));
        }