예제 #1
0
        //chi tiet may
        public ActionResult Detail(int maDN)
        {
            DeNghiList    dnList = new DeNghiList();
            List <DeNghi> obj    = dnList.getDNMa(maDN);

            return(View(obj.FirstOrDefault()));
        }
예제 #2
0
        //xoa
        public ActionResult Delete(int MaDN)
        {
            DeNghiList    dnList = new DeNghiList();
            List <DeNghi> obj    = dnList.getDNMa(MaDN);

            return(View(obj.FirstOrDefault())); //lấy idmay đầu tiên trong danh sách máy
        }
예제 #3
0
        public ActionResult Delete(DeNghi maDN)
        {
            DeNghiList dnList = new DeNghiList();

            dnList.DeleteDN(maDN);
            return(RedirectToAction("Index"));
        }
예제 #4
0
        public ActionResult Edit(DeNghi maDN)
        {
            DeNghiList dnList = new DeNghiList();

            dnList.EditDN(maDN);
            return(RedirectToAction("Index"));
        }
예제 #5
0
        //Đề nghị chờ duyệt


        //sua de nghi
        public ActionResult Edit(int id)
        {
            DeNghiList    dnList = new DeNghiList();
            List <DeNghi> obj    = dnList.getDNMa(id);

            return(View(obj.FirstOrDefault())); //lấy id đầu tiên trong danh sách
        }
예제 #6
0
        //get đề nghị đã duyệt
        public ActionResult DaDuyet()
        {
            DeNghiList    deNghiList = new DeNghiList();
            List <DeNghi> obj        = deNghiList.getDN(1);

            return(View(obj));
        }
예제 #7
0
        // GET: DeNghiCho
        public ActionResult Index()
        {
            DeNghiList    dnList = new DeNghiList();
            List <DeNghi> obj    = dnList.getDN(0);

            return(View(obj));
        }
예제 #8
0
 [HttpPost] //update thong tin len may chu
 public ActionResult Create(DeNghi deNghi)
 {
     if (ModelState.IsValid)
     {
         DeNghiList dnList = new DeNghiList();
         dnList.AddDeNghi(deNghi);
         return(RedirectToAction("Index"));
     }
     return(View());
 }