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;
 }
 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;
     }
 }
 public IList<DanhMucItemData> GetDanhMucItems()
 {
     try
     {
         var domain = new DanhMucItemDomainObject(ConnectionString);
         return domain.GetDanhMucItems();
     }
     catch (Exception ex)
     {
         ErrorLog.WebLog("[GetDanhMucItems]", ex.Message);
         return null;
     }
 }
 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>();
     }
 }
 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;
 }
 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;
     }
 }
 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;
     }
 }