private static bool HasViewAccessRight(ApplicationFroms form) { AccessRight right = new AccessRightService().GetSingle(new AccessRight { FormID = form.ToString(), UserID = CurrentUser.User.UserID }); return(right == null ? false : right.CanView.Value); }
private static bool HasViewAccessRight(ApplicationFroms form) { //if (form == null) return false; AccessRight right = new GenericService <AccessRight>().GetSingle(a => a.FormID == form.ToString() && a.UserID == CurrentUser.User.UserID && a.CanView.Value == true); return(right == null ? false : right.CanView.Value); }
void UpdateAccessRight(AccessRight rights, ApplicationFroms form) { _accessRightService.Update(rights, r => r.UserID == _userID && r.FormID == form.ToString()); }