public JsonResult GetDanhSachLichSuDuyet(int?DuBao)
        {
            var model = db.APAX_DANHSACHLICHSUDUYET(DuBao).ToList();
            var json  = Json(model, JsonRequestBehavior.AllowGet);

            json.MaxJsonLength = int.MaxValue;
            return(json);
        }
Beispiel #2
0
        public JsonResult LoadNguoiDung(int?DuBao)
        {
            var a_th_dubao = db.TH_DUBAO.FirstOrDefault(t => t.A_THUCHIEN == DuBao).A_TH_DUBAO;
            var NguoiDung  = db.DM_DTTC.FirstOrDefault(it => it.TAIKHOAN.Equals(User.Identity.Name));

            try
            {
                var model = db.APAX_DANHSACHLICHSUDUYET(a_th_dubao).FirstOrDefault();
                if (model != null)
                {
                    return(Json(model, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(NguoiDung.TENDTTC, JsonRequestBehavior.AllowGet));
                }
            }
            catch
            {
                return(Json(NguoiDung.TENDTTC, JsonRequestBehavior.AllowGet));
            }
        }