예제 #1
0
        public OtForDetailDto GetOtDetail(int idOperationType, int idUserGroup)
        {
            OperationType ot = new OperationType();

            if (idOperationType == -1)
            {
                ot.OperationTypeFamily = new OperationTypeFamily {
                    Id = 1, Label = "INCONNU"
                };
            }
            else
            {
                ot = _operationTypeRepository.GetOtDetail(idOperationType);
            }
            var otDto = _mapper.Map <OtForDetailDto>(ot);

            otDto.OperationTypeFamily = new ComboSimple <SelectDto>
            {
                List     = _operationTypeFamilyService.GetSelectList(idUserGroup, EnumSelectType.Empty),
                Selected = new SelectDto {
                    Id = ot.OperationTypeFamily.Id, Label = ot.OperationTypeFamily.Label
                }
            };

            return(otDto);
        }
예제 #2
0
        public IActionResult GetSelectList(int idUserGroup, int idMovement, int idSelectType)
        {
            var selectsDto = _operationTypeFamilyService.GetSelectList(idUserGroup, (EnumMovement)idMovement, (EnumSelectType)idSelectType);

            return(Ok(selectsDto));
        }