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)); }
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)); }