public AccessAttribute(IRequestContext requestContext, ApplicationEnum.ModuleName moduleName, ApplicationEnum.ModuleActionType actionType) { _requestContext = requestContext; ModuleName = moduleName; ActionType = actionType; }
private bool IsAccessModule(ApplicationEnum.ModuleActionType actionType, UserModule userModule) { switch (actionType) { case ApplicationEnum.ModuleActionType.Add: return(userModule.IsAdd); case ApplicationEnum.ModuleActionType.Edit: return(userModule.IsEdit); case ApplicationEnum.ModuleActionType.Delete: return(userModule.IsDelete); case ApplicationEnum.ModuleActionType.View: return(userModule.IsView); default: return(false); } }