Esempio n. 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()));
        }
Esempio n. 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);
        }
Esempio n. 3
0
        public int UpdateGroupDesc(UserGroupDTO dto)
        {
            IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase);

            return(dao.UpdateGroupDesc(null, dto));
        }
Esempio n. 4
0
        public int DeleteGroup(NZString GROUP_CD)
        {
            IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase);

            return(dao.Delete(null, GROUP_CD));
        }
Esempio n. 5
0
        public List <UserGroupDTO> LoadAllGroup()
        {
            IUserGroupDAO dao = DAOFactory.CreateUserGroupDAO(CommonLib.Common.CurrentDatabase);

            return(dao.LoadAll(null));
        }