Ejemplo n.º 1
0
        public string ChekLogin(PROP_Authentication auth)
        {
            string JSONString = "";

            DataTable dt = BAL_auth.logincheck(auth);

            if (dt.Rows.Count > 0)
            {
                FormsAuthentication.SetAuthCookie(dt.Rows[0]["FUllUserName"].ToString(), false);
            }
            return(JSONString = JsonConvert.SerializeObject(dt));
        }
Ejemplo n.º 2
0
        public DataTable logincheck(PROP_Authentication pa)
        {
            SqlCommand cmd = new SqlCommand();

            cmd.CommandText = "GJ_AdminLogin";
            cmd.Parameters.AddWithValue("@UserName", pa.UserName);
            cmd.Parameters.AddWithValue("@Password", pa.Password);

            DataTable dt = new DataTable();

            return(dt = Command.ExecuteQuery(cmd));
        }