Exemple #1
0
 /// <summary>
 /// Gets an IList with page of instances of MonHoc.
 /// </summary>
 /// <param name="pageNumber">The page number.</param>
 /// <param name="pageSize">Size of the page.</param>
 /// <param name="totalPages">total pages</param>
 public List<MonHoc> GetPage(int pageNumber, int pageSize, out int totalrow)
 {
     totalrow = 0;
     MonHocDAL itemDAL = new MonHocDAL();
     IDataReader reader = itemDAL.GetPage(pageNumber, pageSize, out totalrow);
     return MonHocDTO.LoadListFromReader(reader);
 }
Exemple #2
0
 /// <summary>
 /// Gets an instance of MonHoc.
 /// </summary>
 /// <param name="monHocGuid"> monHocGuid </param>
 public MonHoc GetMonHoc(Guid monHocGuid)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     using (IDataReader reader = itemDAL.GetOne(monHocGuid))
     {
         return MonHocDTO.PopulateFromReader(reader);
     }
 }
Exemple #3
0
 private Guid Create(MonHoc item)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     item.MonHocGuid = Guid.NewGuid();
     int rowsAffected = itemDAL.Create(item);
     return rowsAffected > 0 ? item.MonHocGuid : Guid.Empty;
 }
Exemple #4
0
 public bool ThemTaiLieuVaoCapDienTu(Guid fileguid, int userlogin)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     return itemDAL.ThemTaiLieuVaoCapDienTu(fileguid, userlogin);
 }
Exemple #5
0
 public int GetCount()
 {
     MonHocDAL itemDAL = new MonHocDAL();
     return itemDAL.GetCount();
 }
Exemple #6
0
 public List<MonHoc> GetAllMonHocTheoGiangVien(int Userid)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     IDataReader reader = itemDAL.GetAllMonHocTheoGiangVien(Userid);
     return MonHocDTO.LoadListFromReaderForList(reader);
 }
Exemple #7
0
 /// <summary>
 /// Gets an IList with all instances of MonHoc.
 /// </summary>
 public List<MonHoc> GetAll()
 {
     MonHocDAL itemDAL = new MonHocDAL();
     IDataReader reader = itemDAL.GetAll();
     return MonHocDTO.LoadListFromReader(reader);
 }
Exemple #8
0
 public bool DeleteLinkURL(Guid monhoc)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     return itemDAL.DeleteLinkURL(monhoc);
 }
Exemple #9
0
 /// <summary>
 /// Deletes an instance of MonHoc. Returns true on success.
 public bool Delete(Guid monHocGuid)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     return itemDAL.Delete(monHocGuid);
 }
Exemple #10
0
 private Guid Update(MonHoc item)
 {
     MonHocDAL itemDAL = new MonHocDAL();
     return itemDAL.Update(item) ? item.MonHocGuid : Guid.Empty;
 }