Пример #1
0
 public List<ConferenceMainImages> GetAllByConferenceIdandLanguageId(int ConferenceId,int LanguageId)
 {
     ConferenceMainImagesDAC _conferenceMainImagesComponent = new ConferenceMainImagesDAC();
     IDataReader reader = _conferenceMainImagesComponent.GetAllConferenceMainImages(String.Format("ConferenceId = {0} AND LanguageId = {1}", ConferenceId, LanguageId)).CreateDataReader();
     List<ConferenceMainImages> _conferenceMainImagesList = new List<ConferenceMainImages>();
     while (reader.Read())
     {
         if (_conferenceMainImagesList == null)
             _conferenceMainImagesList = new List<ConferenceMainImages>();
         ConferenceMainImages _conferenceMainImages = new ConferenceMainImages();
         if (reader["ConferenceMainImageId"] != DBNull.Value)
             _conferenceMainImages.ConferenceMainImageId = Convert.ToInt32(reader["ConferenceMainImageId"]);
         if (reader["PhotoPath"] != DBNull.Value)
             _conferenceMainImages.PhotoPath = Convert.ToString(reader["PhotoPath"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _conferenceMainImages.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         if (reader["LanguageId"] != DBNull.Value)
             _conferenceMainImages.LanguageId = Convert.ToInt32(reader["LanguageId"]);
         if (reader["PhotoLink"] != DBNull.Value)
             _conferenceMainImages.PhotoLink = Convert.ToString(reader["PhotoLink"]);
         if (reader["PhotoTitle"] != DBNull.Value)
             _conferenceMainImages.PhotoTitle = Convert.ToString(reader["PhotoTitle"]);
         if (reader["PhotoDescription"] != DBNull.Value)
             _conferenceMainImages.PhotoDescription = Convert.ToString(reader["PhotoDescription"]);
         _conferenceMainImages.NewRecord = false;
         _conferenceMainImagesList.Add(_conferenceMainImages);
     } reader.Close();
     return _conferenceMainImagesList;
 }
Пример #2
0
 public ConferenceMainImages GetByID(int _conferenceMainImageId)
 {
     ConferenceMainImagesDAC _conferenceMainImagesComponent = new ConferenceMainImagesDAC();
      IDataReader reader = _conferenceMainImagesComponent.GetByIDConferenceMainImages(_conferenceMainImageId);
      ConferenceMainImages _conferenceMainImages = null;
      while(reader.Read())
      {
          _conferenceMainImages = new ConferenceMainImages();
          if(reader["ConferenceMainImageId"] != DBNull.Value)
              _conferenceMainImages.ConferenceMainImageId = Convert.ToInt32(reader["ConferenceMainImageId"]);
          if(reader["PhotoPath"] != DBNull.Value)
              _conferenceMainImages.PhotoPath = Convert.ToString(reader["PhotoPath"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferenceMainImages.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
          if(reader["LanguageId"] != DBNull.Value)
              _conferenceMainImages.LanguageId = Convert.ToInt32(reader["LanguageId"]);
          if(reader["PhotoLink"] != DBNull.Value)
              _conferenceMainImages.PhotoLink = Convert.ToString(reader["PhotoLink"]);
          if(reader["PhotoTitle"] != DBNull.Value)
              _conferenceMainImages.PhotoTitle = Convert.ToString(reader["PhotoTitle"]);
          if(reader["PhotoDescription"] != DBNull.Value)
              _conferenceMainImages.PhotoDescription = Convert.ToString(reader["PhotoDescription"]);
      _conferenceMainImages.NewRecord = false;             }             reader.Close();
      return _conferenceMainImages;
 }
Пример #3
0
 public bool Update(ConferenceMainImages conferencemainimages ,int old_conferenceMainImageId)
 {
     ConferenceMainImagesDAC conferencemainimagesComponent = new ConferenceMainImagesDAC();
     return conferencemainimagesComponent.UpdateConferenceMainImages( conferencemainimages.PhotoPath,  conferencemainimages.ConferenceId,  conferencemainimages.LanguageId,  conferencemainimages.PhotoLink,  conferencemainimages.PhotoTitle,  conferencemainimages.PhotoDescription,  old_conferenceMainImageId);
 }
Пример #4
0
 public bool Insert(ConferenceMainImages conferencemainimages)
 {
     int autonumber = 0;
     ConferenceMainImagesDAC conferencemainimagesComponent = new ConferenceMainImagesDAC();
     bool endedSuccessfuly = conferencemainimagesComponent.InsertNewConferenceMainImages( ref autonumber,  conferencemainimages.PhotoPath,  conferencemainimages.ConferenceId,  conferencemainimages.LanguageId,  conferencemainimages.PhotoLink,  conferencemainimages.PhotoTitle,  conferencemainimages.PhotoDescription);
     if(endedSuccessfuly)
     {
         conferencemainimages.ConferenceMainImageId = autonumber;
     }
     return endedSuccessfuly;
 }