public async Task EditAsync(ReconciliationEditModel model)
        {
            var item = await _repository.GetAsync(model.Id);

            ReconciliationFactory.Create(model, item, _userId);
            _repository.Edit(item);
            await _unitOfWork.SaveChangesAsync();
        }
Ejemplo n.º 2
0
 public static void Create(ReconciliationEditModel model, Reconciliation entity, string userId)
 {
     entity.BankAccountId        = model.BankAccountId;
     entity.ReconciliationDate   = model.ReconciliationDate;
     entity.StatementBalance     = model.StatementBalance;
     entity.IcloseBalance        = model.IcloseBalance;
     entity.ReconciliationStatus = model.ReconciliationStatus;
     entity.IsReconciliation     = model.IsReconciliation;
 }
Ejemplo n.º 3
0
 public async Task <IActionResult> Edit([FromBody] ReconciliationEditModel model)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState.GetErrorList()));
     }
     try
     {
         await _manager.EditAsync(model);
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
     return(Ok());
 }