示例#1
0
        public JsonResult GetAllSuKien()
        {
            var ses = (DoanVienSave)Session[Constant.CUS_SESSION];
            var dt  = (from a in db.DoanVien_Get_SuKien(ses.ID)
                       select new SuKienDoanVienModel
            {
                GhiChu = a.GhiChu,
                ID = a.ID,
                BatDau = a.BatDau.ToString(),
                DiaDiem = a.DiaDiem,
                NoiDung = a.NoiDung,
                Ten = a.Ten,
                TrangThai = a.TrangThai.GetValueOrDefault(),
                TenTrangThai = a.TrangThai.GetValueOrDefault() == 0 ? "Chưa đăng ký" : "Đã đăng ký"
            }).ToList();

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