public ActionResult Edit([Bind(Include = "MaLoai,Cap,MucChietKhau,isXoa")] LOAIDAILY lOAIDAILY)
 {
     if (ModelState.IsValid)
     {
         lOAIDAILY.isXoa           = false;
         db.Entry(lOAIDAILY).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(lOAIDAILY));
 }
        public ActionResult Create([Bind(Include = "MaLoai,Cap,MucChietKhau,isXoa")] LOAIDAILY lOAIDAILY)
        {
            if (ModelState.IsValid)
            {
                lOAIDAILY.isXoa = false;
                db.LOAIDAILies.Add(lOAIDAILY);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(lOAIDAILY));
        }
        // GET: LOAIDAILies/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LOAIDAILY lOAIDAILY = db.LOAIDAILies.Find(id);

            if (lOAIDAILY == null)
            {
                return(HttpNotFound());
            }
            return(View(lOAIDAILY));
        }
        public ActionResult Delete(int id)
        {
            if (Session["username"] == null)
            {
                return(RedirectToAction("Login", "TaiKhoans"));
            }
            LOAIDAILY lOAIDAILY = db.LOAIDAILies.Find(id);

            if (lOAIDAILY == null)
            {
                return(HttpNotFound());
            }
            lOAIDAILY.isXoa           = false;
            db.Entry(lOAIDAILY).State = EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: LOAIDAILies/Edit/5
        public ActionResult Edit(int?id)
        {
            if (Session["username"] == null)
            {
                return(RedirectToAction("Login", "TaiKhoans"));
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LOAIDAILY lOAIDAILY = db.LOAIDAILies.Find(id);

            if (lOAIDAILY == null)
            {
                return(HttpNotFound());
            }
            return(View(lOAIDAILY));
        }