예제 #1
0
파일: SiteLogic.cs 프로젝트: ramyothman/RBM
 public List<Site> GetAll()
 {
     SiteDAC _siteComponent = new SiteDAC();
      IDataReader reader =  _siteComponent.GetAllSite().CreateDataReader();
      List<Site> _siteList = new List<Site>();
      while(reader.Read())
      {
      if(_siteList == null)
          _siteList = new List<Site>();
          Site _site = new Site();
          if(reader["SiteId"] != DBNull.Value)
              _site.SiteId = Convert.ToInt32(reader["SiteId"]);
          if(reader["Name"] != DBNull.Value)
              _site.Name = Convert.ToString(reader["Name"]);
          if(reader["IsActive"] != DBNull.Value)
              _site.IsActive = Convert.ToBoolean(reader["IsActive"]);
          if(reader["TimeFormat"] != DBNull.Value)
              _site.TimeFormat = Convert.ToString(reader["TimeFormat"]);
          if(reader["DateFormat"] != DBNull.Value)
              _site.DateFormat = Convert.ToString(reader["DateFormat"]);
          if(reader["PostSize"] != DBNull.Value)
              _site.PostSize = Convert.ToInt32(reader["PostSize"]);
          if(reader["DefaultSectionId"] != DBNull.Value)
              _site.DefaultSectionId = Convert.ToInt32(reader["DefaultSectionId"]);
          if(reader["DefaultCommentStatusId"] != DBNull.Value)
              _site.DefaultCommentStatusId = Convert.ToInt32(reader["DefaultCommentStatusId"]);
          if(reader["DefaultSecurityAccessTypeId"] != DBNull.Value)
              _site.DefaultSecurityAccessTypeId = Convert.ToInt32(reader["DefaultSecurityAccessTypeId"]);
          if(reader["HomeNewsCount"] != DBNull.Value)
              _site.HomeNewsCount = Convert.ToInt32(reader["HomeNewsCount"]);
          if(reader["HomeEventsCount"] != DBNull.Value)
              _site.HomeEventsCount = Convert.ToInt32(reader["HomeEventsCount"]);
          if(reader["MasterPageTemplateId"] != DBNull.Value)
              _site.MasterPageTemplateId = Convert.ToInt32(reader["MasterPageTemplateId"]);
          if(reader["ShowFullTextArticles"] != DBNull.Value)
              _site.ShowFullTextArticles = Convert.ToBoolean(reader["ShowFullTextArticles"]);
          if(reader["AllowPostingComments"] != DBNull.Value)
              _site.AllowPostingComments = Convert.ToBoolean(reader["AllowPostingComments"]);
          if(reader["AllowAnonymousComments"] != DBNull.Value)
              _site.AllowAnonymousComments = Convert.ToBoolean(reader["AllowAnonymousComments"]);
          if(reader["RowGuid"] != DBNull.Value)
              _site.RowGuid = new Guid(reader["RowGuid"].ToString());
          if(reader["ModifiedDate"] != DBNull.Value)
              _site.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _site.NewRecord = false;
      _siteList.Add(_site);
      }             reader.Close();
      return _siteList;
 }
예제 #2
0
 public bool Insert(int SiteId, string ConferenceName, string ConferenceLogo, DateTime StartDate, DateTime EndDate, bool IsActive, string Location, string LocationName, string LocationLogo, decimal LocationLongitude, decimal LocationLatitude, string ConferenceDomain, string ConferenceCode, string ConferenceAlias, int ConferenceVenueID, bool IsDefault, DateTime AbstractSubmissionStartDate, DateTime AbstractSubmissionEndDate, int AbstractSubmissionEndMessagePageID, int AbstractSubmissionNotStartedPageID)
 {
     ConferencesDAC conferencesComponent = new ConferencesDAC();
     int ConferenceId = 0;
     SiteLogic siteLogic = new ContentManagement.SiteLogic();
     Site site = new Site() { Name = ConferenceName, IsActive = true };
     siteLogic.Insert(site);
     SiteId = site.SiteId;
     return conferencesComponent.InsertNewConferences(ref ConferenceId, SiteId, ConferenceName, ConferenceLogo, StartDate, EndDate, IsActive, Location, LocationName, LocationLogo, LocationLongitude, LocationLatitude, ConferenceDomain, ConferenceCode,ConferenceAlias,ConferenceVenueID,IsDefault,AbstractSubmissionStartDate,AbstractSubmissionEndDate,AbstractSubmissionEndMessagePageID,AbstractSubmissionNotStartedPageID);
 }
예제 #3
0
 public bool Insert(Conferences conferences)
 {
     int autonumber = 0;
     ConferencesDAC conferencesComponent = new ConferencesDAC();
     SiteLogic siteLogic = new ContentManagement.SiteLogic();
     Site site = new Site() { Name = conferences.ConferenceName, IsActive = true };
     siteLogic.Insert(site);
     conferences.SiteId = site.SiteId;
     bool endedSuccessfuly = conferencesComponent.InsertNewConferences(ref autonumber, conferences.SiteId, conferences.ConferenceName, conferences.ConferenceLogo, conferences.StartDate, conferences.EndDate, conferences.IsActive, conferences.Location, conferences.LocationName, conferences.LocationLogo, conferences.LocationLongitude, conferences.LocationLatitude, conferences.ConferenceDomain, conferences.ConferenceCode,conferences.ConferenceAlias,conferences.ConferenceVenueID,conferences.IsDefault,conferences.AbstractSubmissionStartDate,conferences.AbstractSubmissionEndDate,conferences.AbstractSubmissionEndMessagePageID,conferences.AbstractSubmissionNotStartedPageID);
     if (endedSuccessfuly)
     {
         conferences.ConferenceId = autonumber;
     }
     return endedSuccessfuly;
 }
예제 #4
0
파일: SiteLogic.cs 프로젝트: ramyothman/RBM
 public bool Update(Site site ,int old_siteId)
 {
     SiteDAC siteComponent = new SiteDAC();
     return siteComponent.UpdateSite( site.SiteId,  site.Name,  site.IsActive,  site.TimeFormat,  site.DateFormat,  site.PostSize,  site.DefaultSectionId,  site.DefaultCommentStatusId,  site.DefaultSecurityAccessTypeId,  site.HomeNewsCount,  site.HomeEventsCount,  site.MasterPageTemplateId,  site.ShowFullTextArticles,  site.AllowPostingComments,  site.AllowAnonymousComments,  site.RowGuid,  DateTime.Now,  old_siteId);
 }
예제 #5
0
파일: SiteLogic.cs 프로젝트: ramyothman/RBM
 public bool Insert(Site site)
 {
     SiteDAC siteComponent = new SiteDAC();
     int id = 0;
     BusinessLogicLayer.Common.ContentEntityLogic.Insert(ref id, "CS", Guid.NewGuid(), DateTime.Now);
     if (string.IsNullOrEmpty(site.TimeFormat))
         site.TimeFormat = "";
     if (string.IsNullOrEmpty(site.DateFormat))
         site.DateFormat = "";
     site.SiteId = id;
     return siteComponent.InsertNewSite( site.SiteId,  site.Name,  site.IsActive,  site.TimeFormat,  site.DateFormat,  site.PostSize,  site.DefaultSectionId,  site.DefaultCommentStatusId,  site.DefaultSecurityAccessTypeId,  site.HomeNewsCount,  site.HomeEventsCount,  site.MasterPageTemplateId,  site.ShowFullTextArticles,  site.AllowPostingComments,  site.AllowAnonymousComments,  site.RowGuid,  site.ModifiedDate);
 }