public Task <HttpResponseMessage> EditarCondicaoPagamento(CondicaoPagamentoModel model) { HttpResponseMessage response; try { var condicaoPagamento = Mapper.Map <CondicaoPagamento>(model); var condicaoPagamentoRetorno = _condicaoPagamentoService.AtualizarCondicaoPagamento(condicaoPagamento); response = ReturnSuccess(Mapper.Map <CondicaoPagamentoModel>(condicaoPagamentoRetorno)); } catch (Exception ex) { response = ReturnError(ex); } var tsc = new TaskCompletionSource <HttpResponseMessage>(); tsc.SetResult(response); return(tsc.Task); }
public JsonResult NovaCondicaoPagamento(CondicaoPagamentoModel model) { var response = ServiceRequest.Post<CondicaoPagamentoModel>(model, "api/CondicaoPagamento/CriarCondicaoPagamento"); return ReturnResponse(response); }
public JsonResult EditarCondicaoPagamento(CondicaoPagamentoModel model) { var response = ServiceRequest.Put<object>(model, "api/CondicaoPagamento/EditarCondicaoPagamento"); return ReturnResponse(response); }
// GET: CondicaoPagamento public ActionResult Index() { CondicaoPagamentoModel condicaoPagamento = new CondicaoPagamentoModel(); return(View(condicaoPagamento.ListarCondicaoPagamento())); }