Exemplo n.º 1
0
        public static void EventLog(string tieuDe, string tacGia, string tenDangNhap, string noiDung = null, string loi = null)
        {
            try
            {
                using (DangKiThiSinhThiEntities ent = new DangKiThiSinhThiEntities())
                {
                    LoiHeThong log = new LoiHeThong()
                    {
                        TieuDe      = tieuDe,
                        TacGia      = tacGia,
                        TenDangNhap = tenDangNhap,
                        NgayTao     = Convert.ToDateTime(DateTime.Now, new CultureInfo(1066)),
                        NoiDung     = $"{noiDung + string.Empty} - Lỗi: {loi + string.Empty}",
                    };

                    ent.LoiHeThongs.Add(log);
                    ent.SaveChanges();
                }
            }
            catch (Exception ex)
            {
                Utilities.EventLog.LogErr(tieuDe, noiDung, loi);
                Utilities.EventLog.LogErr("EventLog", ex.Message, ex.StackTrace);
            }
        }
Exemplo n.º 2
0
 public bs_DangKiThi()
 {
     _db = new DangKiThiSinhThiEntities();
 }
 public bs_TaiKhoanQuanLy()
 {
     _db = new DangKiThiSinhThiEntities();
 }
Exemplo n.º 4
0
 public bs_QLThoiGianDangKy()
 {
     _db = new DangKiThiSinhThiEntities();
 }
Exemplo n.º 5
0
 public bs_PhanQuyen()
 {
     _db = new DangKiThiSinhThiEntities();
 }
Exemplo n.º 6
0
 public bs_HomeInfo()
 {
     _db = new DangKiThiSinhThiEntities();
 }