Esempio n. 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            BANGLUONG bANGLUONG = db.BANGLUONGs.Find(id);

            db.BANGLUONGs.Remove(bANGLUONG);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "MaLuong,MaNV,HeSoLuong,BacLuong,TongNgayCong")] BANGLUONG bANGLUONG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bANGLUONG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bANGLUONG));
 }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "MaLuong,MaNV,HeSoLuong,BacLuong,TongNgayCong")] BANGLUONG bANGLUONG)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bANGLUONG).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MaNV = new SelectList(db.NHANVIENs, "MaNV", "TenNV", bANGLUONG.MaNV);
     return(View(bANGLUONG));
 }
Esempio n. 4
0
        public ActionResult Create([Bind(Include = "MaLuong,MaNV,HeSoLuong,BacLuong,TongNgayCong")] BANGLUONG bANGLUONG)
        {
            if (ModelState.IsValid)
            {
                db.BANGLUONGs.Add(bANGLUONG);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bANGLUONG));
        }
Esempio n. 5
0
        // GET: BANGLUONGs/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BANGLUONG bANGLUONG = db.BANGLUONGs.Find(id);

            if (bANGLUONG == null)
            {
                return(HttpNotFound());
            }
            return(View(bANGLUONG));
        }
Esempio n. 6
0
        // GET: BANGLUONGs/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BANGLUONG bANGLUONG = db.BANGLUONGs.Find(id);

            if (bANGLUONG == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MaNV = new SelectList(db.NHANVIENs, "MaNV", "TenNV", bANGLUONG.MaNV);
            return(View(bANGLUONG));
        }