public static void SaveLTRemind(SQLiteConnection connection,LTRemindItem item) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLTRemind (item.MaMH, item.NamHoc, item.HocKy) == null) { dtb.AddRemindLT (item); } }
public static void SaveLHRemind(SQLiteConnection connection,LHRemindItem item) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLHRemind (item.IDLH,item.Date) == null) { dtb.AddRemindLH (item); } }
public static List<LichHoc> GetAll (SQLiteConnection connection) { list = new List<LichHoc> (); DataProvider dtb = new DataProvider (connection); list = dtb.GetAllLH (); return list; }
public static List<DiemThi> getAll(SQLiteConnection connection) { list = new List<DiemThi>(); DataProvider dtb = new DataProvider (connection); list = dtb.GetAllDT (); return list; }
public static void AddLH (LichHoc lt, SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLH_Ma (lt.MaMH) == null) { dtb.AddLH (lt); } }
public static bool IsLogined(SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); if (dtb.GetMainUser () != null) return true; return false; }
public static int AddCTHP(SQLiteConnection connection, CTHocPhi ct) { DataProvider dtb = new DataProvider (connection); if (dtb.GetCTHP (ct) == null) { return dtb.AddCTHP (ct); } return 0; }
public static int Add(DiemThi lt,SQLiteConnection connection ) { DataProvider dtb = new DataProvider (connection); if (dtb.GetDT (lt.NamHoc,lt.Hocky).Count==0) { return dtb.AddDT (lt); } return 0; }
public static int AddHP(SQLiteConnection connection, HocPhi hp) { DataProvider dtb = new DataProvider (connection); if (dtb.GetHP (hp.NamHoc,hp.HocKy) == null) { return dtb.AddHP (hp); } return 0; }
public static int AddDM(DiemMon dm,SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); if (dtb.GetDM (dm) == null) { return dtb.AddDM(dm); } return 0; }
public static int AddUser(SQLiteConnection connection,User user) { DataProvider dtb = new DataProvider (connection); if (dtb.GetUser (user.Id) == null) { return dtb.AddUser (user); } return 0; }
public static int Add(SQLiteConnection connection,MonHoc mh) { DataProvider dtb = new DataProvider (connection); if (dtb.GetMonHoc (mh.MaMH) == null) { return dtb.AddMH (mh); } return 0; }
public static void AddCTLH (SQLiteConnection connection, chiTietLH ct) { DataProvider dtb = new DataProvider (connection); if (dtb.checkCTLH (ct) == null) { dtb.AddCTLH (ct); } }
public static int GetId (SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLastLH () == null) { return 0; } string k = dtb.GetLastLH ().Id; return int.Parse (k); }
public static bool AddLH (LichHoc lh, SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLH_Ma (lh.MaMH, lh.NamHoc,lh.HocKy) == null) { dtb.AddLH (lh); return true; } return false; }
public static int AddLT(LichThi lt,SQLiteConnection connection ) { DataProvider dtb = new DataProvider (connection); if (dtb.GetLT (lt.MaMH,lt.NamHoc,lt.HocKy) == null) { dtb.AddLT (lt); return 1; } return 0; }
public static int UpdateMH(SQLiteConnection connection,MonHoc mh) { try { DataProvider dtb = new DataProvider (connection); return dtb.UpdateMH(mh); } catch { return 0; } }
public static void RemoveRemind(SQLiteConnection connection,string eventID) { DataProvider dtb = new DataProvider (connection); dtb.RemoveRemind (eventID); }
public static MonHoc GetMH(SQLiteConnection connection,string mamh) { DataProvider dtb = new DataProvider (connection); return dtb.GetMonHoc (mamh); }
public static User GetUser(SQLiteConnection connection,string id ) { DataProvider dtb = new DataProvider (connection); return dtb.GetUser (id); }
public static List<DiemMon> GetDiemMons(SQLiteConnection connection, int hocky, int namhoc) { DataProvider dtb = new DataProvider (connection); return dtb.GetDMs (hocky, namhoc); }
public static HocPhi GetHP(SQLiteConnection connection,int namhoc, int hocky) { DataProvider dtb = new DataProvider (connection); return dtb.GetHP (namhoc,hocky); }
public static List<CTHocPhi> GetCTHP(SQLiteConnection connection,int namhoc, int hocky) { DataProvider dtb = new DataProvider (connection); return dtb.GetCTHPs ( namhoc, hocky); }
public static void RemoveAllRM(SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); dtb.RemoveALlLHRemind (); dtb.RemoveALlLTRemind (); }
public static List<LTRemindItem> GetAllLTRemind(SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); return dtb.GetAllLTRemind (); }
public static User GetMainUser(SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); return dtb.GetMainUser (); }
public static LTRemindItem GetLTRemind(SQLiteConnection connection,string mamh,string namhoc,string hocky) { DataProvider dtb = new DataProvider (connection); return dtb.GetLTRemind(mamh,namhoc,hocky); }
public static List<LHRemindItem> GetLHRemind(SQLiteConnection connection,string id) { DataProvider dtb = new DataProvider (connection); return dtb.GetLHRemind (id); }
public static void LogOut(SQLiteConnection connection) { DataProvider dtb = new DataProvider (connection); dtb.DeleteAll (); }
public static LHRemindItem GetLHRemind(SQLiteConnection connection,string id,string date) { DataProvider dtb = new DataProvider (connection); return dtb.GetLHRemind (id,date); }