// GET: KHENTHUONGCBs/Create
        public ActionResult Create()
        {
            KHENTHUONGCB obj = new KHENTHUONGCB();

            obj.KTCB_MA = CreateID.CreateID_ByteText();
            return(View(obj));
        }
        public ActionResult DeleteConfirmed(string id)
        {
            KHENTHUONGCB kHENTHUONGCB = db.KHENTHUONGCBs.Find(id);

            db.KHENTHUONGCBs.Remove(kHENTHUONGCB);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "KTCB_MA,KTCB_NGAY,KTCB_THANHTICH")] KHENTHUONGCB kHENTHUONGCB)
 {
     if (ModelState.IsValid)
     {
         db.Entry(kHENTHUONGCB).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(kHENTHUONGCB));
 }
        public ActionResult Create([Bind(Include = "KTCB_MA,KTCB_NGAY,KTCB_THANHTICH")] KHENTHUONGCB kHENTHUONGCB)
        {
            if (ModelState.IsValid)
            {
                db.KHENTHUONGCBs.Add(kHENTHUONGCB);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(kHENTHUONGCB));
        }
        // GET: KHENTHUONGCBs/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            KHENTHUONGCB kHENTHUONGCB = db.KHENTHUONGCBs.Find(id);

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