示例#1
0
 public ActionResult Detail(String id)
 {
     WebBanHang.Models.Order model = null;
     try
     {
         model = new Orderss().GetById(long.Parse(id));
     }
     catch
     {
         ViewBag.messagerError = "alert alert-danger";
         ModelState.AddModelError("", "Lỗi không đọc được csdl");
     }
     return(View(model));
 }
示例#2
0
 public ActionResult Detail(WebBanHang.Models.Order model)
 {
     try
     {
         new Orderss().Update(model);
         // Edit
         ViewBag.messagerError = "alert alert-success";
         ModelState.AddModelError("", "Lưu thành công hóa đơn : " + model.Id);
     }
     catch
     {
         ViewBag.messagerError = "alert alert-danger";
         ModelState.AddModelError("", "Lỗi không lưu được csdl");
     }
     return(View(model));
 }