public ActionResult Menu() { HangF hf = new HangF(); var lst = hf.Hangs.ToList(); return(PartialView("MenuH", lst)); }
public ActionResult Xoa(string id) { MyDBContext db = new MyDBContext(); HangF hf = new HangF(); Hang model = hf.ChitietHang(id); return(View(model)); }
public ActionResult Xoa(Hang model) { HangF hf = new HangF(); try { if (hf.Delete(model.IDHang)) { return(RedirectToAction("DanhSachHang")); } else { return(View()); } } catch { return(View()); } }
public ActionResult Them(Hang model) { HangF hf = new HangF(); try { if (hf.InSert(model)) { return(RedirectToAction("DanhSachHang")); } else { return(View()); } } catch { return(View()); } }