public ActionResult Edit(string id) { model = new ShopLapModel(); Product product = model.Products.Find(id); pro = product; ViewBag.Dongmay = new SelectList(model.SubCategories.ToList().OrderBy(x => x.mahienthi), "mahienthi", "tendanhmuccon"); return(View(product)); }
public ActionResult CreateSubCategory() { model = new ShopLapModel(); ViewBag.madanhmuc = madanhmuc; dao = new CategoryDao(); Category cate = dao.FindCategory(madanhmuc); ViewBag.tendanhmuc = cate.tendanhmuc; return(View()); }
public ActionResult Details(int ma) { madonhang = ma; ShopLapModel model = new ShopLapModel(); Order order = model.Orders.Find(ma); ViewBag.giohang = order; var rs = from s in model.OrderDetails where s.madathang == order.ma select s; return(View(rs)); }
public ActionResult EditSubCategory(string ma) { dao = new CategoryDao(); SubCategory subCate = dao.FindSubCategory(ma); model = new ShopLapModel(); SelectList selectList = new SelectList(model.Categories.ToList().OrderBy(x => x.ma), "ma", "tendanhmuc"); ViewBag.Danhmuc = selectList; return(View(subCate)); }
public ActionResult UpdateStatus() { ShopLapModel model = new ShopLapModel(); Order order = model.Orders.Find(madonhang); order.status = "Đã nhận hàng và thanh toán"; int lineChange = model.SaveChanges(); if (lineChange != 0) { return(RedirectToAction("OrderManager", "HomeAd")); } else { return(Redirect(Request.UrlReferrer.ToString())); } }
public CategoryDao() { shopLapModel = new ShopLapModel(); }
public OrderDetailDao() { model = new ShopLapModel(); }
public ProductsDao() { model = new ShopLapModel(); }
public ActionResult Create() { model = new ShopLapModel(); return(View()); }
public ActionResult Create() { model = new ShopLapModel(); ViewBag.Dongmay = new SelectList(model.SubCategories.ToList().OrderBy(x => x.mahienthi), "mahienthi", "tendanhmuccon"); return(View()); }
public UserDao() { model = new ShopLapModel(); }
public CustomerDao() { model = new ShopLapModel(); }