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;
 }
 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;
 }
 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);
 }
 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;
 }