public JsonResult Delete(int idm)
        {
            var x = new CaThiDAO().DeleteCATHI(idm);

            return(Json(new
            {
                result = x
            }));
        }
        public ActionResult Create(CATHI p)
        {
            bool idPHONG = false;

            if (ModelState.IsValid)
            {
                var dao = new CaThiDAO();
                idPHONG = dao.AddCATHI(p);
            }

            return(Json(idPHONG, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public ActionResult getMonThi(int id)
        {
            DetailSchedule result = new CaThiDAO().getAllInfoCaThi(id);

            if (result == null)
            {
                return(Json(null, JsonRequestBehavior.AllowGet));
            }
            else
            {
                var k = new { IDMon = result.IDMon, NameSubject = result.NameSubject, MaChiTietCa = result.MaChiTietCa };
                return(Json(k, JsonRequestBehavior.AllowGet));
            }
        }
        public ActionResult Edit(CATHI sub)
        {
            bool kq = false;

            if (ModelState.IsValid)
            {
                var dao = new CaThiDAO();

                if (dao.UpdateCATHI(sub))
                {
                    kq = true;
                }
                else
                {
                    kq = false;
                }
            }

            return(Json(kq, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public ActionResult getCaThi(string id)
        {
            var kq = new CaThiDAO().DsCATHI().Where(i => i.MaKhoaThi == id);

            return(Json(kq.Select(x => new { ID = x.ID, Ca = x.Ca }), JsonRequestBehavior.AllowGet));
        }
        public JsonResult showSchedule()
        {
            var x = new CaThiDAO().DsCATHI();

            return(Json(new { result = x }));
        }
        public ActionResult Get(int id)
        {
            var PHONG = new CaThiDAO().getInfoCATHI(id);

            return(Json(PHONG, JsonRequestBehavior.AllowGet));
        }