public ActionResult OrderConfirm(int id = 0, int ShopId = 0, int CustomerId = 0, int Total = 0, string PaymentType = "") { // //bool redirect = false; var OrderData = new DataSet(); var method = new OrderCrudViewModel(); try { OrderData = method.ConfirmOrder(id, ShopId, CustomerId, Total, PaymentType); } catch (Exception e) { TempData["OrderHomeMessage"] = e.Message; } if (OrderData.Tables.Count > 0) { TempData["BillingData"] = OrderData; return(RedirectToAction("GenerateBill")); } var orderview = new List <OrderDetailView>(); try { orderview = method.GetOrderDetail(id); } catch (Exception e) { TempData["OrderHomeMessage"] = e.Message; } return(View("Order", orderview)); //return Json(new { redirectUrl = Url.Action("GenerateBill", "ShopManger", new { id = 2 }), isRedirect = redirect }, JsonRequestBehavior.AllowGet); }
public ActionResult OrderDetail(int id = 0) { var orderview = new List <OrderDetailView>(); var method = new OrderCrudViewModel(); try { orderview = method.GetOrderDetail(id); } catch (Exception e) { TempData["OrderHomeMessage"] = e.Message; } return(View(orderview)); }