public ActionResult CreatePaymentType(IdDescriptionViewModel paymentType) { var npt = new DescriptionRequest() { Description = paymentType.Description }; try { var result = false; if (paymentType.Id == 0) { result = this.PaymentTypeService.CreatePaymentType(npt); } if (result) { return(Redirect("/System/Index")); } else { return(View("../Shared/Error")); } } catch (Exception ex) { return(View("../Shared/Error")); } }
public ActionResult CreateLaboralUnion(IdDescriptionViewModel laboralUnion) { var nlu = new DescriptionRequest() { Description = laboralUnion.Description }; try { var result = false; if (laboralUnion.Id == 0) { result = this.LaboralUnionService.CreateLaboralUnion(nlu); } if (result) { return(Redirect("/System/Index")); } else { return(View("../Shared/Error")); } } catch (Exception ex) { return(View("../Shared/Error")); } }
public ActionResult CreateLaboralUnion() { var viewModel = new IdDescriptionViewModel(); return(View(viewModel)); }
public ActionResult CreatePaymentType() { var viewModel = new IdDescriptionViewModel(); return(View(viewModel)); }