Example #1
0
 public List<SitePageLayout> GetAllBySiteId(int SiteID)
 {
     SitePageLayoutDAC _sitePageLayoutComponent = new SitePageLayoutDAC();
     IDataReader reader = _sitePageLayoutComponent.GetAllSitePageLayout("SiteID = " + SiteID).CreateDataReader();
     List<SitePageLayout> _sitePageLayoutList = new List<SitePageLayout>();
     while (reader.Read())
     {
         if (_sitePageLayoutList == null)
             _sitePageLayoutList = new List<SitePageLayout>();
         SitePageLayout _sitePageLayout = new SitePageLayout();
         if (reader["SitePageLayoutID"] != DBNull.Value)
             _sitePageLayout.SitePageLayoutID = Convert.ToInt32(reader["SitePageLayoutID"]);
         if (reader["SiteID"] != DBNull.Value)
             _sitePageLayout.SiteID = Convert.ToInt32(reader["SiteID"]);
         if (reader["Name"] != DBNull.Value)
             _sitePageLayout.Name = Convert.ToString(reader["Name"]);
         if (reader["DesignCode"] != DBNull.Value)
             _sitePageLayout.DesignCode = Convert.ToString(reader["DesignCode"]);
         if (reader["PreviewCode"] != DBNull.Value)
             _sitePageLayout.PreviewCode = Convert.ToString(reader["PreviewCode"]);
         if (reader["PreviewClass"] != DBNull.Value)
             _sitePageLayout.PreviewClass = Convert.ToString(reader["PreviewClass"]);
         _sitePageLayout.NewRecord = false;
         _sitePageLayoutList.Add(_sitePageLayout);
     } reader.Close();
     return _sitePageLayoutList;
 }
Example #2
0
 public SitePageLayout GetByID(int _sitePageLayoutID)
 {
     SitePageLayoutDAC _sitePageLayoutComponent = new SitePageLayoutDAC();
      IDataReader reader = _sitePageLayoutComponent.GetByIDSitePageLayout(_sitePageLayoutID);
      SitePageLayout _sitePageLayout = null;
      while(reader.Read())
      {
          _sitePageLayout = new SitePageLayout();
          if(reader["SitePageLayoutID"] != DBNull.Value)
              _sitePageLayout.SitePageLayoutID = Convert.ToInt32(reader["SitePageLayoutID"]);
          if(reader["SiteID"] != DBNull.Value)
              _sitePageLayout.SiteID = Convert.ToInt32(reader["SiteID"]);
          if(reader["Name"] != DBNull.Value)
              _sitePageLayout.Name = Convert.ToString(reader["Name"]);
          if(reader["DesignCode"] != DBNull.Value)
              _sitePageLayout.DesignCode = Convert.ToString(reader["DesignCode"]);
          if(reader["PreviewCode"] != DBNull.Value)
              _sitePageLayout.PreviewCode = Convert.ToString(reader["PreviewCode"]);
          if(reader["PreviewClass"] != DBNull.Value)
              _sitePageLayout.PreviewClass = Convert.ToString(reader["PreviewClass"]);
      _sitePageLayout.NewRecord = false;             }             reader.Close();
      return _sitePageLayout;
 }
Example #3
0
 public bool Update(SitePageLayout sitepagelayout ,int old_sitePageLayoutID)
 {
     SitePageLayoutDAC sitepagelayoutComponent = new SitePageLayoutDAC();
     return sitepagelayoutComponent.UpdateSitePageLayout( sitepagelayout.SiteID,  sitepagelayout.Name,  sitepagelayout.DesignCode,  sitepagelayout.PreviewCode,  sitepagelayout.PreviewClass,  old_sitePageLayoutID);
 }
Example #4
0
 public bool Insert(SitePageLayout sitepagelayout)
 {
     int autonumber = 0;
     SitePageLayoutDAC sitepagelayoutComponent = new SitePageLayoutDAC();
     bool endedSuccessfuly = sitepagelayoutComponent.InsertNewSitePageLayout( ref autonumber,  sitepagelayout.SiteID,  sitepagelayout.Name,  sitepagelayout.DesignCode,  sitepagelayout.PreviewCode,  sitepagelayout.PreviewClass);
     if(endedSuccessfuly)
     {
         sitepagelayout.SitePageLayoutID = autonumber;
     }
     return endedSuccessfuly;
 }