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 void Delete(int Original_ConferenceMainImageId)
 {
     ConferenceMainImagesDAC conferencemainimagesComponent = new ConferenceMainImagesDAC();
     conferencemainimagesComponent.DeleteConferenceMainImages(Original_ConferenceMainImageId);
 }
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     ConferenceMainImagesDAC conferencemainimagescomponent = new ConferenceMainImagesDAC();
     return conferencemainimagescomponent.UpdateDataset(dataset);
 }
 public bool Update( string PhotoPath,  int ConferenceId,  int LanguageId,  string PhotoLink,  string PhotoTitle,  string PhotoDescription,  int Original_ConferenceMainImageId)
 {
     ConferenceMainImagesDAC conferencemainimagesComponent = new ConferenceMainImagesDAC();
     return conferencemainimagesComponent.UpdateConferenceMainImages( PhotoPath,  ConferenceId,  LanguageId,  PhotoLink,  PhotoTitle,  PhotoDescription,  Original_ConferenceMainImageId);
 }
 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( string PhotoPath,  int ConferenceId,  int LanguageId,  string PhotoLink,  string PhotoTitle,  string PhotoDescription)
        {
            ConferenceMainImagesDAC conferencemainimagesComponent = new ConferenceMainImagesDAC();
            int ConferenceMainImageId = 0;

            return conferencemainimagesComponent.InsertNewConferenceMainImages( ref ConferenceMainImageId,  PhotoPath,  ConferenceId,  LanguageId,  PhotoLink,  PhotoTitle,  PhotoDescription);
        }
 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;
 }