示例#1
0
 public ActionResult GetAll(Guid communityId)
 {
     try
     {
         InvoiceScheduleMapper invoiceSchedueMapper = new InvoiceScheduleMapper();
         var invoiceSetupSchedules = this._invoiceScheduleService.GetAll(communityId);
         var response = invoiceSchedueMapper.MapAll(invoiceSetupSchedules);
         return(Ok(response));
     }
     catch (Exception ex)
     {
         return(new UnknownErrorResult(ex, base._errorEnabled));
     }
 }
示例#2
0
 public ActionResult Add(Guid setUpId, InvoiceSetupScheduleInfoApiModel invoiceSetupScheduleApi)
 {
     try
     {
         InvoiceScheduleMapper invoiceSchedueMapper = new InvoiceScheduleMapper();
         var invoiceSetupSchedule  = invoiceSchedueMapper.Map(invoiceSetupScheduleApi);
         var childInvoiceSetupList = this._invoiceScheduleService.Create(setUpId, invoiceSetupSchedule);
         var mappedSchedule        = invoiceSchedueMapper.Map(childInvoiceSetupList);
         var response = new ApiResponse(new { Id = setUpId, Schedule = mappedSchedule }, ApiStatus.Success);
         return(SendResponse(response, "InvoiceSchedule"));
     }
     catch (Exception ex)
     {
         return(new UnknownErrorResult(ex, base._errorEnabled));
     }
 }