示例#1
0
        public ActionResult IndexDetail(int ma)
        {
            tbl_DeXuat_TM tm = new tbl_DeXuat_TM();

            tm         = new DeXuatTMDao().load(ma).FirstOrDefault();
            ViewBag.TM = tm;
            var model = new DeXuatDao().Detail(ma);

            return(View(model));
        }
示例#2
0
        public ActionResult Detail(int Id)
        {
            DeXuatModel model = new DeXuatModel();

            if (Id > 0)
            {
                model = new DeXuatDao().Detail(Id);
            }

            return(PartialView("_DetailTradeRequest", model));
        }
示例#3
0
        public ActionResult Save(DeXuatModel model)
        {
            if (!ModelState.IsValid)
            {
                return(PartialView("_DetailTradeRequest", model));
            }
            bool status;

            if (model.Id > 0)
            {
                status = new DeXuatDao().Update(model);
            }
            else
            {
                status = new DeXuatDao().Save(model);
            }
            return(Json(new { status = status }, JsonRequestBehavior.AllowGet));
        }
示例#4
0
        // Kiểm tra tồn tại của đề xuất
        public JsonResult CheckExistDX(string ma)
        {
            bool status = new DeXuatDao().CheckExistDX(ma);

            return(Json(status, JsonRequestBehavior.AllowGet));
        }
示例#5
0
        public ActionResult Delete(int ma)
        {
            bool status = new DeXuatDao().Delete(ma);

            return(Json(new { status = status }, JsonRequestBehavior.AllowGet));
        }
示例#6
0
        public ActionResult Load()
        {
            var model = new DeXuatDao().Load();

            return(Json(new { data = model }, JsonRequestBehavior.AllowGet));
        }