예제 #1
0
 protected override PaymentMethod DoPostPutDto(Client currentClient, PaymentMethodDTO dto, PaymentMethod entity, string path, object param)
 {
     if (entity == null)
     {
         entity = new PaymentMethod();
     }
     GetMapper.Map(dto, entity);
     if (dto.Bill != null && dto.Bill.Id != 0 && dto.Bill.Id != null)
     {
         entity.Bill = BillService.PreProcessDTOPostPut(validationDictionnary, dto.HomeId, dto.Bill, currentClient, path);
     }
     if (dto.PaymentType != null)
     {
         entity.PaymentType = PaymentTypeService.PreProcessDTOPostPut(validationDictionnary, dto.HomeId, dto.PaymentType, currentClient, path);
     }
     return(entity);
 }
예제 #2
0
 protected override BillItem DoPostPutDto(Client currentClient, BillItemDTO dto, BillItem entity, string path, object param)
 {
     if (entity == null)
     {
         entity = new BillItem();
     }
     GetMapper.Map(dto, entity);
     if (dto.Bill != null && dto.Bill.Id != null && dto.Bill.Id != 0)
     {
         entity.Bill = BillService.PreProcessDTOPostPut(validationDictionnary, dto.HomeId, dto.Bill, currentClient, path);
     }
     if (dto.BillItemCategory != null)
     {
         entity.BillItemCategory = BillItemCategoryService.PreProcessDTOPostPut(validationDictionnary, dto.HomeId, dto.BillItemCategory, currentClient, path);
     }
     if (dto.GroupBillItem != null)
     {
         entity.GroupBillItem = GroupBillItemService.PreProcessDTOPostPut(validationDictionnary, dto.HomeId, dto.GroupBillItem, currentClient, path);
     }
     return(entity);
 }