示例#1
0
 public List<HomePage> GetAll()
 {
     HomePageDAC _homePageComponent = new HomePageDAC();
      IDataReader reader =  _homePageComponent.GetAllHomePage().CreateDataReader();
      List<HomePage> _homePageList = new List<HomePage>();
      while(reader.Read())
      {
      if(_homePageList == null)
          _homePageList = new List<HomePage>();
          HomePage _homePage = new HomePage();
          if(reader["HomePageID"] != DBNull.Value)
              _homePage.HomePageID = Convert.ToInt32(reader["HomePageID"]);
          if(reader["SectionID"] != DBNull.Value)
              _homePage.SectionID = Convert.ToInt32(reader["SectionID"]);
          if(reader["ContentModuleTypeID"] != DBNull.Value)
              _homePage.ContentModuleTypeID = Convert.ToInt32(reader["ContentModuleTypeID"]);
          if(reader["PositionID"] != DBNull.Value)
              _homePage.PositionID = Convert.ToInt32(reader["PositionID"]);
          if(reader["OrderNumber"] != DBNull.Value)
              _homePage.OrderNumber = Convert.ToInt32(reader["OrderNumber"]);
          if(reader["IsFullWidth"] != DBNull.Value)
              _homePage.IsFullWidth = Convert.ToBoolean(reader["IsFullWidth"]);
          if(reader["ItemsNumber"] != DBNull.Value)
              _homePage.ItemsNumber = Convert.ToInt32(reader["ItemsNumber"]);
          if(reader["ItemsPerPage"] != DBNull.Value)
              _homePage.ItemsPerPage = Convert.ToInt32(reader["ItemsPerPage"]);
          if(reader["IsActive"] != DBNull.Value)
              _homePage.IsActive = Convert.ToBoolean(reader["IsActive"]);
          if (reader["SiteID"] != DBNull.Value)
              _homePage.SiteID = Convert.ToInt32(reader["SiteID"]);
          if (reader["LanguageID"] != DBNull.Value)
              _homePage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
          if (reader["Title"] != DBNull.Value)
              _homePage.Title = Convert.ToString(reader["Title"]);
          if (reader["HomePageGroupID"] != DBNull.Value)
              _homePage.HomePageGroupID = Convert.ToInt32(reader["HomePageGroupID"]);
      _homePage.NewRecord = false;
      _homePageList.Add(_homePage);
      }             reader.Close();
      return _homePageList;
 }
示例#2
0
 public void Delete(int Original_HomePageID)
 {
     HomePageDAC homepageComponent = new HomePageDAC();
     homepageComponent.DeleteHomePage(Original_HomePageID);
 }
示例#3
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     HomePageDAC homepagecomponent = new HomePageDAC();
     return homepagecomponent.UpdateDataset(dataset);
 }
示例#4
0
 public bool Update(int SectionID, int ContentModuleTypeID, int PositionID, int OrderNumber, bool IsFullWidth, int ItemsNumber, int ItemsPerPage, bool IsActive, int SiteID, string Title, int LanguageID, int HomePageGroupID, int Original_HomePageID)
 {
     HomePageDAC homepageComponent = new HomePageDAC();
     return homepageComponent.UpdateHomePage( SectionID,  ContentModuleTypeID,  PositionID,  OrderNumber,  IsFullWidth,  ItemsNumber,  ItemsPerPage,  IsActive,Title,LanguageID,HomePageGroupID,  Original_HomePageID);
 }
示例#5
0
 public bool Update(HomePage homepage ,int old_homePageID)
 {
     HomePageDAC homepageComponent = new HomePageDAC();
     return homepageComponent.UpdateHomePage( homepage.SectionID,  homepage.ContentModuleTypeID,  homepage.PositionID,  homepage.OrderNumber,  homepage.IsFullWidth,  homepage.ItemsNumber,  homepage.ItemsPerPage,  homepage.IsActive,homepage.Title,homepage.LanguageID,homepage.HomePageGroupID,  old_homePageID);
 }
示例#6
0
        public bool Insert(int SectionID, int ContentModuleTypeID, int PositionID, int OrderNumber, bool IsFullWidth, int ItemsNumber, int ItemsPerPage, bool IsActive, int SiteID, string Title, int LanguageID, int HomePageGroupID)
        {
            HomePageDAC homepageComponent = new HomePageDAC();
            int HomePageID = 0;

            return homepageComponent.InsertNewHomePage( ref HomePageID,  SectionID,  ContentModuleTypeID,  PositionID,  OrderNumber,  IsFullWidth,  ItemsNumber,  ItemsPerPage,  IsActive,Title,LanguageID,HomePageGroupID);
        }
示例#7
0
 public bool Insert(HomePage homepage)
 {
     int autonumber = 0;
     HomePageDAC homepageComponent = new HomePageDAC();
     bool endedSuccessfuly = homepageComponent.InsertNewHomePage( ref autonumber,  homepage.SectionID,  homepage.ContentModuleTypeID,  homepage.PositionID,  homepage.OrderNumber,  homepage.IsFullWidth,  homepage.ItemsNumber,  homepage.ItemsPerPage,  homepage.IsActive,homepage.Title,homepage.LanguageID,homepage.HomePageGroupID);
     if(endedSuccessfuly)
     {
         homepage.HomePageID = autonumber;
     }
     return endedSuccessfuly;
 }
示例#8
0
 public HomePage GetByID(int _homePageID)
 {
     HomePageDAC _homePageComponent = new HomePageDAC();
      IDataReader reader = _homePageComponent.GetByIDHomePage(_homePageID);
      HomePage _homePage = null;
      while(reader.Read())
      {
          _homePage = new HomePage();
          if(reader["HomePageID"] != DBNull.Value)
              _homePage.HomePageID = Convert.ToInt32(reader["HomePageID"]);
          if(reader["SectionID"] != DBNull.Value)
              _homePage.SectionID = Convert.ToInt32(reader["SectionID"]);
          if(reader["ContentModuleTypeID"] != DBNull.Value)
              _homePage.ContentModuleTypeID = Convert.ToInt32(reader["ContentModuleTypeID"]);
          if(reader["PositionID"] != DBNull.Value)
              _homePage.PositionID = Convert.ToInt32(reader["PositionID"]);
          if(reader["OrderNumber"] != DBNull.Value)
              _homePage.OrderNumber = Convert.ToInt32(reader["OrderNumber"]);
          if(reader["IsFullWidth"] != DBNull.Value)
              _homePage.IsFullWidth = Convert.ToBoolean(reader["IsFullWidth"]);
          if(reader["ItemsNumber"] != DBNull.Value)
              _homePage.ItemsNumber = Convert.ToInt32(reader["ItemsNumber"]);
          if(reader["ItemsPerPage"] != DBNull.Value)
              _homePage.ItemsPerPage = Convert.ToInt32(reader["ItemsPerPage"]);
          if(reader["IsActive"] != DBNull.Value)
              _homePage.IsActive = Convert.ToBoolean(reader["IsActive"]);
          if (reader["SiteID"] != DBNull.Value)
              _homePage.SiteID = Convert.ToInt32(reader["SiteID"]);
          if (reader["LanguageID"] != DBNull.Value)
              _homePage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
          if (reader["Title"] != DBNull.Value)
              _homePage.Title = Convert.ToString(reader["Title"]);
          if (reader["HomePageGroupID"] != DBNull.Value)
              _homePage.HomePageGroupID = Convert.ToInt32(reader["HomePageGroupID"]);
      _homePage.NewRecord = false;             }             reader.Close();
      return _homePage;
 }