Пример #1
0
        public List<Conferences> GetAll()
        {
            ConferencesDAC _conferencesComponent = new ConferencesDAC();
            IDataReader reader = _conferencesComponent.GetAllConferences().CreateDataReader();
            List<Conferences> _conferencesList = new List<Conferences>();
            while (reader.Read())
            {
                if (_conferencesList == null)
                    _conferencesList = new List<Conferences>();
                Conferences _conferences = new Conferences();
                if (reader["ConferenceId"] != DBNull.Value)
                    _conferences.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
                if (reader["SiteId"] != DBNull.Value)
                    _conferences.SiteId = Convert.ToInt32(reader["SiteId"]);
                if (reader["ConferenceName"] != DBNull.Value)
                    _conferences.ConferenceName = Convert.ToString(reader["ConferenceName"]);
                if (reader["ConferenceLogo"] != DBNull.Value)
                    _conferences.ConferenceLogo = Convert.ToString(reader["ConferenceLogo"]);
                if (reader["StartDate"] != DBNull.Value)
                    _conferences.StartDate = Convert.ToDateTime(reader["StartDate"]);
                if (reader["EndDate"] != DBNull.Value)
                    _conferences.EndDate = Convert.ToDateTime(reader["EndDate"]);
                if (reader["IsActive"] != DBNull.Value)
                    _conferences.IsActive = Convert.ToBoolean(reader["IsActive"]);
                if (reader["Location"] != DBNull.Value)
                    _conferences.Location = Convert.ToString(reader["Location"]);
                if (reader["LocationName"] != DBNull.Value)
                    _conferences.LocationName = Convert.ToString(reader["LocationName"]);
                if (reader["LocationLogo"] != DBNull.Value)
                    _conferences.LocationLogo = Convert.ToString(reader["LocationLogo"]);
                if (reader["LocationLongitude"] != DBNull.Value)
                    _conferences.LocationLongitude = Convert.ToDecimal(reader["LocationLongitude"]);
                if (reader["LocationLatitude"] != DBNull.Value)
                    _conferences.LocationLatitude = Convert.ToDecimal(reader["LocationLatitude"]);
                if (reader["ConferenceDomain"] != DBNull.Value)
                    _conferences.ConferenceDomain = Convert.ToString(reader["ConferenceDomain"]);
                if (reader["ConferenceCode"] != DBNull.Value)
                    _conferences.ConferenceCode = Convert.ToString(reader["ConferenceCode"]);
                if (reader["ConferenceVenueID"] != DBNull.Value)
                    _conferences.ConferenceVenueID = Convert.ToInt32(reader["ConferenceVenueID"]);
                if (reader["ConferenceAlias"] != DBNull.Value)
                    _conferences.ConferenceAlias = Convert.ToString(reader["ConferenceAlias"]);
                if (reader["IsDefault"] != DBNull.Value)
                    _conferences.IsDefault = Convert.ToBoolean(reader["IsDefault"]);
                if (reader["AbstractSubmissionStartDate"] != DBNull.Value)
                    _conferences.AbstractSubmissionStartDate = Convert.ToDateTime(reader["AbstractSubmissionStartDate"]);
                if (reader["AbstractSubmissionEndDate"] != DBNull.Value)
                    _conferences.AbstractSubmissionEndDate = Convert.ToDateTime(reader["AbstractSubmissionEndDate"]);
                if (reader["AbstractSubmissionEndMessagePageID"] != DBNull.Value)
                    _conferences.AbstractSubmissionEndMessagePageID = Convert.ToInt32(reader["AbstractSubmissionEndMessagePageID"]);
                if (reader["AbstractSubmissionNotStartedPageID"] != DBNull.Value)
                    _conferences.AbstractSubmissionNotStartedPageID = Convert.ToInt32(reader["AbstractSubmissionNotStartedPageID"]);

                _conferences.NewRecord = false;
                _conferencesList.Add(_conferences);
            } reader.Close();
            return _conferencesList;
        }
Пример #2
0
        public bool Update(int SiteId, string ConferenceName, string ConferenceLogo, DateTime StartDate, DateTime EndDate, bool IsActive, string Location, string LocationName, string LocationLogo, decimal LocationLongitude, decimal LocationLatitude, string ConferenceDomain, int ConferenceParentId, int LanguageID, int Original_ConferenceId)
        {
            ConferencesLanguageDAC conferenceslanguageComponent = new ConferencesLanguageDAC();

            BusinessLogicLayer.Entities.Conference.Conferences conference = Common.ConferencesLogic.GetByID(ConferenceParentId);
            StartDate         = conference.StartDate;
            EndDate           = conference.EndDate;
            IsActive          = conference.IsActive;
            LocationLongitude = conference.LocationLongitude;
            LocationLatitude  = conference.LocationLatitude;
            ConferenceDomain  = conference.ConferenceDomain;
            return(conferenceslanguageComponent.UpdateConferencesLanguage(SiteId, ConferenceName, ConferenceLogo, StartDate, EndDate, IsActive, Location, LocationName, LocationLogo, LocationLongitude, LocationLatitude, ConferenceDomain, ConferenceParentId, LanguageID, Original_ConferenceId));
        }
Пример #3
0
 public bool Update(Conferences conferences, int old_conferenceId)
 {
     ConferencesDAC conferencesComponent = new ConferencesDAC();
     SiteLogic siteLogic = new ContentManagement.SiteLogic();
     Site site = siteLogic.GetByID(conferences.SiteId);
     site.Name = conferences.ConferenceName;
     siteLogic.Update(site, site.SiteId);
     return conferencesComponent.UpdateConferences(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, old_conferenceId);
 }
Пример #4
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;
 }