public JsonResult EditOrderTerms(OrderTermViewModel terms) { var result = new OperationResult(); OrderTerm orderTerms = new OrderTermConverter().ConvertToDomain(terms); result = _orderTermRepository.UpdateOrderTerm(orderTerms); return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult GetTermsByCustomer(string customerId) { OrderTermViewModel model = new OrderTermViewModel(); var term = _orderTermRepository.GetOrderTermsByCustomer(customerId); if (term != null) { model = new OrderTermConverter().ConvertToView(term); } return(Json(model, JsonRequestBehavior.AllowGet)); }
public ActionResult _OrderTerms(string customerId) { var model = new CustomerViewModel(); var orderTerms = _orderTermRepository.GetOrderTermsByCustomer(customerId); if (orderTerms != null) { model = new OrderTermConverter().ConvertToCustomerView(orderTerms); } var customer = _customerDynamicsRepository.GetCustomer(customerId); model.CustomerName = customer.SHRTNAME; return(PartialView(model)); }