public ComboMultiple <SelectGroupDto> GetListForComboByIdPlanPoste(int idUserGroup, int idPlanPoste, int idReferenceTable, int idPoste)
        {
            ComboMultiple <SelectGroupDto> result = new ComboMultiple <SelectGroupDto>();

            List <PlanPosteReference> planPosteReferences = Get(idPlanPoste, idReferenceTable);
            List <int> idList = planPosteReferences.Select(x => x.IdReference).ToList();

            switch (idReferenceTable)
            {
            case 1:     //OPERATION_TYPE_FAMILY
                result.List         = _referentialService.OperationTypeFamilyService.GetSelectGroupListByIdPoste(idUserGroup, idPoste);
                result.ListSelected = _referentialService.OperationTypeFamilyService.GetSelectListByIdList(idList);
                break;

            case 2:     // "OPERATION_TYPE"
                result.List         = _referentialService.OperationTypeService.GetSelectGroupListByIdPoste(idUserGroup, idPoste);
                result.ListSelected = _referentialService.OperationTypeService.GetSelectListByIdList(idList);
                break;

            case 3:     //TODO OPERATION
                result.List         = _referentialService.OperationService.GetSelectGroupListByIdPoste(idUserGroup, idPoste);
                result.ListSelected = _referentialService.OperationService.GetSelectListByIdList(idList);
                break;
            }

            return(result);
        }
        public ComboMultiple <SelectGroupDto> GetAccountComboMultiple(int idPlan, int idUserGroup)
        {
            ComboMultiple <SelectGroupDto> result = new ComboMultiple <SelectGroupDto>
            {
                List         = _userAccountService.GetBankSubFamilySelectGroup(idUserGroup),
                ListSelected = GetSelectAccountByIdPlan(idPlan)
            };

            return(result);
        }
示例#3
0
        public ComboMultiple <SelectDto> GetUserComboMultiple(int idPlan, int idUserGroup)
        {
            var users    = _userService.GetByIdUserGroup(idUserGroup);
            var userList = _mapper.Map <List <SelectDto> >(users);

            var planUsers     = GetByIdPlan(idPlan);
            var usersSelected = _mapper.Map <List <SelectDto> >(planUsers);

            ComboMultiple <SelectDto> result = new ComboMultiple <SelectDto>
            {
                List         = userList,
                ListSelected = usersSelected
            };

            return(result);
        }