public bool UserLog(int userid) { try { DataTable dt = us_dll.CheckUserLog(userid); if (dt.Rows.Count > 0) { ErrorMessage("You did not log out properly!"); us_dll.UpdateUserLog(userid); return(false); } else { RegisterUserLog(userid); return(true); } } catch (Exception ex) { throw ex; } }