Exemple #1
0
 public JsonResult UpSetPayAmount(PayAmountDto PayAmount)
 {
     return(ExceptionCatch.Invoke(() =>
     {
         if (PayAmount.Id > 0)
         {
             PayAmountService.Instance.UpdatePayAmount(PayAmount);
         }
         else
         {
             PayAmountService.Instance.AddPayAmount(PayAmount);
         }
     }));
 }
 public void UpdatePayAmount(PayAmountDto dto)
 {
     payAmountRepository.Save(x => x.Id == dto.Id, x => new PayAmount {
         BaseAmount = dto.BaseAmount, CalType = EnumHelper.Parse <CalTypeEnum>(dto.CalType), GiveAmount = dto.GiveAmount
     });
 }
        public void AddPayAmount(PayAmountDto dto)
        {
            var entity = dto.ToModel <PayAmount>();

            payAmountRepository.Insert(entity);
        }