Example #1
0
 public async Task <long> Save(ReaperDetailDTO entity)
 {
     try
     {
         return(await _reaperDetailDAL.Save(_mapper.Map <ReaperDetail>(entity)));
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Example #2
0
        private async Task <long> SaveReaper(TransactionDTO entity)
        {
            ReaperDetailDTO reaperDetail = new ReaperDetailDTO()
            {
                Date          = entity.Date,
                Weight        = entity.ClientQuantity,
                TonPrice      = entity.ReapersPay,
                ReaperId      = entity.ReaperId,
                TransactionId = entity.Id
            };

            if (_ISEDITMODE)//Edit Mode
            {
                var oldReaperDetail = await GetReaperDetailByTransactionId(entity.Id);

                reaperDetail.Id = oldReaperDetail.Id;
            }
            return(await _reaperDetailDSL.Save(reaperDetail));
        }
 public async Task <IActionResult> Save(ReaperDetailDTO model) => Ok(await _reaperDetailDSL.Save(model));