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); } }
public bs_DangKiThi() { _db = new DangKiThiSinhThiEntities(); }
public bs_TaiKhoanQuanLy() { _db = new DangKiThiSinhThiEntities(); }
public bs_QLThoiGianDangKy() { _db = new DangKiThiSinhThiEntities(); }
public bs_PhanQuyen() { _db = new DangKiThiSinhThiEntities(); }
public bs_HomeInfo() { _db = new DangKiThiSinhThiEntities(); }