public LookupData LoadLookup(bool orderByKey) { IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase); List <UserGroupDTO> dtos = dao.LoadAll(null, orderByKey); return(new LookupData(DTOUtility.ConvertListToDataTable(dtos), UserGroupDTO.eColumns.GROUP_NAME.ToString(), UserGroupDTO.eColumns.GROUP_CD.ToString())); }
public int AddNewGroup(UserGroupDTO dto) { UserGroupValidator valUserGroup = new UserGroupValidator(); if (valUserGroup.ValidateBeforeAdd(dto)) { IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase); return(dao.AddNew(null, dto)); } return(0); }
public int UpdateGroupDesc(UserGroupDTO dto) { IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase); return(dao.UpdateGroupDesc(null, dto)); }
public int DeleteGroup(NZString GROUP_CD) { IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase); return(dao.Delete(null, GROUP_CD)); }
public List <UserGroupDTO> LoadAllGroup() { IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase); return(dao.LoadAll(null)); }