コード例 #1
0
 public System.Int32 AddDanhMucItem(DanhMucItemData data)
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.Add(data);
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[AddDanhMucItem]", ex.Message);
     }
     return -1;
 }
コード例 #2
0
 public IList<DanhMucItemData> GetDanhMucItemsByDanhMuc(string maLoaiDanhMuc)
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItems(string.Format(" AND di.MaLoaiDanhMuc = '{0}'", maLoaiDanhMuc));
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[GetDanhMucItemsByDanhMuc]", ex.Message);
         return null;
     }
 }
コード例 #3
0
 public IList<DanhMucItemData> GetDanhMucItems()
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItems();
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[GetDanhMucItems]", ex.Message);
         return null;
     }
 }
コード例 #4
0
 public IList<DanhMucItemData> GetDanhMucItemPaging(System.String whereCondition, System.Int32 pageSize, System.Int32 currentPage, System.String sortByColumns)
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItemPaging(whereCondition, pageSize, currentPage, sortByColumns);
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[GetDanhMucItemPaging]", ex.Message);
         return new List<DanhMucItemData>();
     }
 }
コード例 #5
0
 public System.Int32 GetDanhMucItemCount(System.String whereCondition)
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItemCount(whereCondition);
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[GetDanhMucItemCount]", ex.Message);
     }
     return -1;
 }
コード例 #6
0
 public IList<DanhMucItemData> GetDanhMucItemBySizeCriteria(System.Int32 size, System.String whereCondition)
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItems(size, whereCondition);
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[GetDanhMucItemBySizeCriteria]", ex.Message);
         return null;
     }
 }
コード例 #7
0
 public DanhMucItemData GetDanhMucItemByID(System.Int32 ID, System.String MaLoaiDanhMuc)
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItemByID(ID, MaLoaiDanhMuc);
     }
     catch (Exception ex)
     {
         ErrorLog.Log("[GetDanhMucItemByID]", ex.Message);
         return null;
     }
 }