public ActionResult DeleteConfirmed(string id) { CAUTHU_GHIBAN cAUTHU_GHIBAN = db.CAUTHU_GHIBAN.Find(id); db.CAUTHU_GHIBAN.Remove(cAUTHU_GHIBAN); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MaCTGB,MaTranDau,MaCauThu,ThoiDiem,MaLoaiBanThang")] CAUTHU_GHIBAN cAUTHU_GHIBAN) { if (ModelState.IsValid) { db.Entry(cAUTHU_GHIBAN).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaLoaiBanThang = new SelectList(db.BANTHANGs, "MaLoaiBanThang", "BanThang1", cAUTHU_GHIBAN.MaLoaiBanThang); ViewBag.MaCauThu = new SelectList(db.CAUTHUs, "MaCauThu", "MaDoi", cAUTHU_GHIBAN.MaCauThu); ViewBag.MaTranDau = new SelectList(db.TRAUDAUs, "MaTranDau", "MaMua", cAUTHU_GHIBAN.MaTranDau); return(View(cAUTHU_GHIBAN)); }
// GET: CAUTHU_GHIBAN/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CAUTHU_GHIBAN cAUTHU_GHIBAN = db.CAUTHU_GHIBAN.Find(id); if (cAUTHU_GHIBAN == null) { return(HttpNotFound()); } return(View(cAUTHU_GHIBAN)); }
// GET: CAUTHU_GHIBAN/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CAUTHU_GHIBAN cAUTHU_GHIBAN = db.CAUTHU_GHIBAN.Find(id); if (cAUTHU_GHIBAN == null) { return(HttpNotFound()); } ViewBag.MaLoaiBanThang = new SelectList(db.BANTHANGs, "MaLoaiBanThang", "BanThang1", cAUTHU_GHIBAN.MaLoaiBanThang); ViewBag.MaCauThu = new SelectList(db.CAUTHUs, "MaCauThu", "TenCauThu", cAUTHU_GHIBAN.MaCauThu); ViewBag.MaTranDau = new SelectList(db.TRAUDAUs, "MaTranDau", "MaTranDau", cAUTHU_GHIBAN.MaTranDau); return(View(cAUTHU_GHIBAN)); }