Example #1
0
 public List<SitePageCategory> GetAllBySitePageId(int SitePageId)
 {
     SitePageCategoryDAC _sitePageCategoryComponent = new SitePageCategoryDAC();
     IDataReader reader = _sitePageCategoryComponent.GetAllSitePageCategory(" SitePageId = " + SitePageId).CreateDataReader();
     List<SitePageCategory> _sitePageCategoryList = new List<SitePageCategory>();
     while (reader.Read())
     {
         if (_sitePageCategoryList == null)
             _sitePageCategoryList = new List<SitePageCategory>();
         SitePageCategory _sitePageCategory = new SitePageCategory();
         if (reader["SitePageCategoryId"] != DBNull.Value)
             _sitePageCategory.SitePageCategoryId = Convert.ToInt32(reader["SitePageCategoryId"]);
         if (reader["SiteCategoryId"] != DBNull.Value)
             _sitePageCategory.SiteCategoryId = Convert.ToInt32(reader["SiteCategoryId"]);
         if (reader["SitePageId"] != DBNull.Value)
             _sitePageCategory.SitePageId = Convert.ToInt32(reader["SitePageId"]);
         if (reader["ModifiedDate"] != DBNull.Value)
             _sitePageCategory.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
         _sitePageCategory.NewRecord = false;
         _sitePageCategoryList.Add(_sitePageCategory);
     } reader.Close();
     return _sitePageCategoryList;
 }
Example #2
0
 public SitePageCategory GetByID(int _sitePageCategoryId)
 {
     SitePageCategoryDAC _sitePageCategoryComponent = new SitePageCategoryDAC();
      IDataReader reader = _sitePageCategoryComponent.GetByIDSitePageCategory(_sitePageCategoryId);
      SitePageCategory _sitePageCategory = null;
      while(reader.Read())
      {
          _sitePageCategory = new SitePageCategory();
          if(reader["SitePageCategoryId"] != DBNull.Value)
              _sitePageCategory.SitePageCategoryId = Convert.ToInt32(reader["SitePageCategoryId"]);
          if(reader["SiteCategoryId"] != DBNull.Value)
              _sitePageCategory.SiteCategoryId = Convert.ToInt32(reader["SiteCategoryId"]);
          if(reader["SitePageId"] != DBNull.Value)
              _sitePageCategory.SitePageId = Convert.ToInt32(reader["SitePageId"]);
          if(reader["ModifiedDate"] != DBNull.Value)
              _sitePageCategory.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
         _sitePageCategory.NewRecord = false;
      }
      reader.Close();
      return _sitePageCategory;
 }
Example #3
0
 public void DeleteBySitePageId(int Original_SitePageId)
 {
     SitePageCategoryDAC sitepagecategoryComponent = new SitePageCategoryDAC();
     sitepagecategoryComponent.DeleteSitePageCategoryBySitePageId(Original_SitePageId);
 }
Example #4
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     SitePageCategoryDAC sitepagecategorycomponent = new SitePageCategoryDAC();
     return sitepagecategorycomponent.UpdateDataset(dataset);
 }
Example #5
0
 public bool Update( int SiteCategoryId,  int SitePageId,  DateTime ModifiedDate,  int Original_SitePageCategoryId)
 {
     SitePageCategoryDAC sitepagecategoryComponent = new SitePageCategoryDAC();
     return sitepagecategoryComponent.UpdateSitePageCategory( SiteCategoryId,  SitePageId,  ModifiedDate,  Original_SitePageCategoryId);
 }
Example #6
0
 public bool Update(SitePageCategory sitepagecategory ,int old_sitePageCategoryId)
 {
     SitePageCategoryDAC sitepagecategoryComponent = new SitePageCategoryDAC();
     return sitepagecategoryComponent.UpdateSitePageCategory( sitepagecategory.SiteCategoryId,  sitepagecategory.SitePageId,  sitepagecategory.ModifiedDate,  old_sitePageCategoryId);
 }
Example #7
0
        public bool Insert( int SiteCategoryId,  int SitePageId,  DateTime ModifiedDate)
        {
            SitePageCategoryDAC sitepagecategoryComponent = new SitePageCategoryDAC();
            int SitePageCategoryId = 0;

            return sitepagecategoryComponent.InsertNewSitePageCategory( ref SitePageCategoryId,  SiteCategoryId,  SitePageId,  ModifiedDate);
        }
Example #8
0
 public bool Insert(SitePageCategory sitepagecategory)
 {
     int autonumber = 0;
     SitePageCategoryDAC sitepagecategoryComponent = new SitePageCategoryDAC();
     bool endedSuccessfuly = sitepagecategoryComponent.InsertNewSitePageCategory( ref autonumber,  sitepagecategory.SiteCategoryId,  sitepagecategory.SitePageId,  sitepagecategory.ModifiedDate);
     if(endedSuccessfuly)
     {
         sitepagecategory.SitePageCategoryId = autonumber;
     }
     return endedSuccessfuly;
 }