public ActionResult DeleteConfirmed(int id)
        {
            CT_DT_Thang cT_DT_Thang = db.CT_DT_Thangs.Find(id);

            db.CT_DT_Thangs.Remove(cT_DT_Thang);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "CT_DTT_ID,DoanhThu,TyLe,ThangID,PhongID")] CT_DT_Thang cT_DT_Thang)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cT_DT_Thang).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ThangID = new SelectList(db.Doanh_Thu_Thangs, "ThangID", "Thang", cT_DT_Thang.ThangID);
     ViewBag.PhongID = new SelectList(db.Phongs, "PhongID", "TenPhong", cT_DT_Thang.PhongID);
     return(View(cT_DT_Thang));
 }
        // GET: CT_DT_Thang/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CT_DT_Thang cT_DT_Thang = db.CT_DT_Thangs.Find(id);

            if (cT_DT_Thang == null)
            {
                return(HttpNotFound());
            }
            return(View(cT_DT_Thang));
        }
        // GET: CT_DT_Thang/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CT_DT_Thang cT_DT_Thang = db.CT_DT_Thangs.Find(id);

            if (cT_DT_Thang == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ThangID = new SelectList(db.Doanh_Thu_Thangs, "ThangID", "Thang", cT_DT_Thang.ThangID);
            ViewBag.PhongID = new SelectList(db.Phongs, "PhongID", "TenPhong", cT_DT_Thang.PhongID);
            return(View(cT_DT_Thang));
        }