public async Task <object> Post(NCIDeductionModel request) { var http = HttpClientHelper.NciHttpClient; object resultContent = new object(); try { if (request.ID == 0) { request.CreateBy = SecurityHelper.CurrentPrincipal.UserId.ToString(); request.CreatTime = DateTime.Now; } else { request.Updateby = SecurityHelper.CurrentPrincipal.UserId.ToString(); request.UpdateTime = DateTime.Now; } request.Debitmonth = request.Debitmonth; request.DeductionStatus = (int)DeductionStatus.UnCharge; request.DeductionType = (int)DeductionType.NCIOpr; var result = await http.PostAsJsonAsync("/api/DeductionInfo/saveDeduction", request); resultContent = await result.Content.ReadAsAsync <object>(); } catch (Exception ex) { resultContent = "-1"; } return(resultContent); }
public IHttpActionResult SaveDeduction(NCIDeductionModel request) { var response = service.SaveDeduction(request); return(Ok(response)); }
public BaseResponse SaveDeduction(NCIDeductionModel request) { return(base.Save <LTC_NCIDEDUCTION, NCIDeductionModel>(request, (q) => q.ID == request.ID)); }