示例#1
0
 public List<SitePage> GetAllBySectionId(string SectionId)
 {
     SitePageDAC _sitePageComponent = new SitePageDAC();
     string whereCondition = "";
     if (!string.IsNullOrEmpty(SectionId) && SectionId != "0")
     {
         whereCondition = "SectionId = " + SectionId;
     }
     IDataReader reader = _sitePageComponent.GetAllSitePage(whereCondition).CreateDataReader();
     List<SitePage> _sitePageList = new List<SitePage>();
     while (reader.Read())
     {
         if (_sitePageList == null)
             _sitePageList = new List<SitePage>();
         SitePage _sitePage = new SitePage();
         if (reader["SitePageId"] != DBNull.Value)
             _sitePage.SitePageId = Convert.ToInt32(reader["SitePageId"]);
         if (reader["SectionId"] != DBNull.Value)
             _sitePage.SectionId = Convert.ToInt32(reader["SectionId"]);
         if (reader["PageStatusId"] != DBNull.Value)
             _sitePage.PageStatusId = Convert.ToInt32(reader["PageStatusId"]);
         if (reader["SecurityAccessTypeId"] != DBNull.Value)
             _sitePage.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
         if (reader["CreatorId"] != DBNull.Value)
             _sitePage.CreatorId = Convert.ToInt32(reader["CreatorId"]);
         if (reader["UniquePageName"] != DBNull.Value)
             _sitePage.UniquePageName = Convert.ToString(reader["UniquePageName"]);
         if (reader["IsMainPage"] != DBNull.Value)
             _sitePage.IsMainPage = Convert.ToBoolean(reader["IsMainPage"]);
         if (reader["RowGuid"] != DBNull.Value)
             _sitePage.RowGuid = new Guid(reader["RowGuid"].ToString());
         if (reader["RevisionDate"] != DBNull.Value)
             _sitePage.RevisionDate = Convert.ToDateTime(reader["RevisionDate"]);
         if (reader["ModifiedDate"] != DBNull.Value)
             _sitePage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
         if (reader["SiteId"] != DBNull.Value)
             _sitePage.SiteId = Convert.ToInt32(reader["SiteId"]);
         _sitePage.NewRecord = false;
         _sitePageList.Add(_sitePage);
     } reader.Close();
     return _sitePageList;
 }
示例#2
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     SitePageDAC sitepagecomponent = new SitePageDAC();
     return sitepagecomponent.UpdateDataset(dataset);
 }
示例#3
0
 public void Delete(int Original_SitePageId)
 {
     SitePageDAC sitepageComponent = new SitePageDAC();
     sitepageComponent.DeleteSitePage(Original_SitePageId);
     BusinessLogicLayer.Common.ContentEntityLogic.Delete(Original_SitePageId);
 }
示例#4
0
 public bool Update( int SitePageId,  int SectionId,  int PageStatusId,  int SecurityAccessTypeId,  int CreatorId,  string UniquePageName,  bool IsMainPage,  Guid RowGuid,  DateTime RevisionDate,  DateTime ModifiedDate,int SiteId,  int Original_SitePageId)
 {
     SitePageDAC sitepageComponent = new SitePageDAC();
     return sitepageComponent.UpdateSitePage( SitePageId,  SectionId,  PageStatusId,  SecurityAccessTypeId,  CreatorId,  UniquePageName,  IsMainPage,  RowGuid,  RevisionDate,  DateTime.Now,  Original_SitePageId);
 }
示例#5
0
 public bool Update(SitePage sitepage ,int old_sitePageId)
 {
     SitePageDAC sitepageComponent = new SitePageDAC();
     return sitepageComponent.UpdateSitePage( sitepage.SitePageId,  sitepage.SectionId,  sitepage.PageStatusId,  sitepage.SecurityAccessTypeId,  sitepage.CreatorId,  sitepage.UniquePageName,  sitepage.IsMainPage,  sitepage.RowGuid,  sitepage.RevisionDate,  DateTime.Now,  old_sitePageId);
 }
示例#6
0
 public bool Insert( int SitePageId,  int SectionId,  int PageStatusId,  int SecurityAccessTypeId,  int CreatorId,  string UniquePageName,  bool IsMainPage,  Guid RowGuid,  DateTime RevisionDate,  DateTime ModifiedDate,int SiteId)
 {
     SitePageDAC sitepageComponent = new SitePageDAC();
     int id = 0;
     BusinessLogicLayer.Common.ContentEntityLogic.Insert(ref id, "CP", Guid.NewGuid(), DateTime.Now);
     return sitepageComponent.InsertNewSitePage( id,  SectionId,  PageStatusId,  SecurityAccessTypeId,  CreatorId,  UniquePageName,  IsMainPage,  Guid.NewGuid(),  DateTime.Now,  DateTime.Now);
 }
示例#7
0
 public bool Insert(SitePage sitepage)
 {
     SitePageDAC sitepageComponent = new SitePageDAC();
     int id = 0;
     BusinessLogicLayer.Common.ContentEntityLogic.Insert(ref id, "CP", Guid.NewGuid(), DateTime.Now);
     sitepage.SitePageId = id;
     return sitepageComponent.InsertNewSitePage( sitepage.SitePageId,  sitepage.SectionId,  sitepage.PageStatusId,  sitepage.SecurityAccessTypeId,  sitepage.CreatorId,  sitepage.UniquePageName,  sitepage.IsMainPage,  sitepage.RowGuid,  sitepage.RevisionDate,  sitepage.ModifiedDate);
 }
示例#8
0
        public SitePage GetDefaultPage(int SiteId)
        {
            SitePageDAC _sitePageComponent = new SitePageDAC();
            IDataReader reader = _sitePageComponent.GetAllSitePage("IsMainPage = 1 and SiteId = " + SiteId).CreateDataReader();
            SitePage _sitePage = null;
            while (reader.Read())
            {

                _sitePage = new SitePage();
                if (reader["SitePageId"] != DBNull.Value)
                    _sitePage.SitePageId = Convert.ToInt32(reader["SitePageId"]);
                if (reader["SectionId"] != DBNull.Value)
                    _sitePage.SectionId = Convert.ToInt32(reader["SectionId"]);
                if (reader["PageStatusId"] != DBNull.Value)
                    _sitePage.PageStatusId = Convert.ToInt32(reader["PageStatusId"]);
                if (reader["SecurityAccessTypeId"] != DBNull.Value)
                    _sitePage.SecurityAccessTypeId = Convert.ToInt32(reader["SecurityAccessTypeId"]);
                if (reader["CreatorId"] != DBNull.Value)
                    _sitePage.CreatorId = Convert.ToInt32(reader["CreatorId"]);
                if (reader["UniquePageName"] != DBNull.Value)
                    _sitePage.UniquePageName = Convert.ToString(reader["UniquePageName"]);
                if (reader["IsMainPage"] != DBNull.Value)
                    _sitePage.IsMainPage = Convert.ToBoolean(reader["IsMainPage"]);
                if (reader["RowGuid"] != DBNull.Value)
                    _sitePage.RowGuid = new Guid(reader["RowGuid"].ToString());
                if (reader["RevisionDate"] != DBNull.Value)
                    _sitePage.RevisionDate = Convert.ToDateTime(reader["RevisionDate"]);
                if (reader["ModifiedDate"] != DBNull.Value)
                    _sitePage.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
                if (reader["SiteId"] != DBNull.Value)
                    _sitePage.SiteId = Convert.ToInt32(reader["SiteId"]);
                _sitePage.NewRecord = false;
            } reader.Close();
            return _sitePage;
        }