Пример #1
0
        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()));
        }
Пример #2
0
        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);
        }
Пример #3
0
        public int UpdateGroupDesc(UserGroupDTO dto)
        {
            IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase);

            return(dao.UpdateGroupDesc(null, dto));
        }
Пример #4
0
        public int DeleteGroup(NZString GROUP_CD)
        {
            IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase);

            return(dao.Delete(null, GROUP_CD));
        }
Пример #5
0
        public List <UserGroupDTO> LoadAllGroup()
        {
            IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase);

            return(dao.LoadAll(null));
        }