public bool ISValidLogin() { if (HttpContext.Current.Session["User"] != null) { return(true); } else { Encrypt.CloseUserSession(); return(false); } }
public bool ISValidLogin() { if (HttpContext.Current.Session["User"] != null) { var chkrole = JsonConvert.DeserializeObject <Users>(HttpContext.Current.Session["User"].ToString()); if (chkrole.UserRole == "Admin") { return(true); } else { return(false); } } else { Encrypt.CloseUserSession(); return(false); } }