Example #1
0
 public ActionResult Detail(string id = "")
 {
     try
     {
         if (string.IsNullOrEmpty(id))
         {
             return(RedirectToAction("Index"));
         }
         else
         {
             ViewBag.Title  = "Order Detail";
             ViewBag.Method = "Edit";
             Order order             = CatalogBLL.GetOrder(Convert.ToInt32(id));
             List <OrderDetail> data = CatalogBLL.ListOfOrderDetails(Convert.ToInt32(id));
             var model = new Models.OrderDetailResult()
             {
                 order = order,
                 data  = data
             };
             return(View(model));
         }
     }
     catch (Exception ex)
     {
         return(Content(ex.Message + ":" + ex.StackTrace));
     }
 }
 public ActionResult OrderDetail(string id = "")
 {
     if (!string.IsNullOrEmpty(id))
     {
         ViewBag.Title      = "Order Detail";
         ViewBag.SmallTitle = "Chi tiết đơn hàng";
         List <OrderDetail> ListDetail = CatalogBLL.ListOfOrderDetail(Convert.ToInt32(id));
         var model = new Models.OrderDetailResult()
         {
             Data = ListDetail,
         };
         return(View(model));
     }
     return(RedirectToAction("Index"));
 }