public List<ConferenceMediaReference> GetAll(int ConferenceId,int LanguageId)
 {
     ConferenceMediaReferenceDAC _conferenceMediaReferenceComponent = new ConferenceMediaReferenceDAC();
     IDataReader reader = _conferenceMediaReferenceComponent.GetAllConferenceMediaReference(string.Format("ConferenceId = {0} and LanguageId = {1}",ConferenceId,LanguageId)).CreateDataReader();
     List<ConferenceMediaReference> _conferenceMediaReferenceList = new List<ConferenceMediaReference>();
     while (reader.Read())
     {
         if (_conferenceMediaReferenceList == null)
             _conferenceMediaReferenceList = new List<ConferenceMediaReference>();
         ConferenceMediaReference _conferenceMediaReference = new ConferenceMediaReference();
         if (reader["ConferenceMediaReferenceId"] != DBNull.Value)
             _conferenceMediaReference.ConferenceMediaReferenceId = Convert.ToInt32(reader["ConferenceMediaReferenceId"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _conferenceMediaReference.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         if (reader["LanguageId"] != DBNull.Value)
             _conferenceMediaReference.LanguageId = Convert.ToInt32(reader["LanguageId"]);
         if (reader["ReferenceOrder"] != DBNull.Value)
             _conferenceMediaReference.ReferenceOrder = Convert.ToInt32(reader["ReferenceOrder"]);
         if (reader["Title"] != DBNull.Value)
             _conferenceMediaReference.Title = Convert.ToString(reader["Title"]);
         if (reader["ReferenceUrl"] != DBNull.Value)
             _conferenceMediaReference.ReferenceUrl = Convert.ToString(reader["ReferenceUrl"]);
         if (reader["ReferenceName"] != DBNull.Value)
             _conferenceMediaReference.ReferenceName = Convert.ToString(reader["ReferenceName"]);
         if (reader["ReferenceLogo"] != DBNull.Value)
             _conferenceMediaReference.ReferenceLogo = Convert.ToString(reader["ReferenceLogo"]);
         if (reader["PublishingDate"] != DBNull.Value)
             _conferenceMediaReference.PublishingDate = Convert.ToDateTime(reader["PublishingDate"]);
         _conferenceMediaReference.NewRecord = false;
         _conferenceMediaReferenceList.Add(_conferenceMediaReference);
     } reader.Close();
     return _conferenceMediaReferenceList;
 }
 public bool Insert(ConferenceMediaReference conferencemediareference)
 {
     int autonumber = 0;
     ConferenceMediaReferenceDAC conferencemediareferenceComponent = new ConferenceMediaReferenceDAC();
     bool endedSuccessfuly = conferencemediareferenceComponent.InsertNewConferenceMediaReference( ref autonumber,  conferencemediareference.ConferenceId,  conferencemediareference.LanguageId,  conferencemediareference.ReferenceOrder,  conferencemediareference.Title,  conferencemediareference.ReferenceUrl,  conferencemediareference.ReferenceName,  conferencemediareference.ReferenceLogo,  conferencemediareference.PublishingDate);
     if(endedSuccessfuly)
     {
         conferencemediareference.ConferenceMediaReferenceId = autonumber;
     }
     return endedSuccessfuly;
 }
 public bool Update(ConferenceMediaReference conferencemediareference ,int old_conferenceMediaReferenceId)
 {
     ConferenceMediaReferenceDAC conferencemediareferenceComponent = new ConferenceMediaReferenceDAC();
     return conferencemediareferenceComponent.UpdateConferenceMediaReference( conferencemediareference.ConferenceId,  conferencemediareference.LanguageId,  conferencemediareference.ReferenceOrder,  conferencemediareference.Title,  conferencemediareference.ReferenceUrl,  conferencemediareference.ReferenceName,  conferencemediareference.ReferenceLogo,  conferencemediareference.PublishingDate,  old_conferenceMediaReferenceId);
 }
 public ConferenceMediaReference GetByID(int _conferenceMediaReferenceId)
 {
     ConferenceMediaReferenceDAC _conferenceMediaReferenceComponent = new ConferenceMediaReferenceDAC();
      IDataReader reader = _conferenceMediaReferenceComponent.GetByIDConferenceMediaReference(_conferenceMediaReferenceId);
      ConferenceMediaReference _conferenceMediaReference = null;
      while(reader.Read())
      {
          _conferenceMediaReference = new ConferenceMediaReference();
          if(reader["ConferenceMediaReferenceId"] != DBNull.Value)
              _conferenceMediaReference.ConferenceMediaReferenceId = Convert.ToInt32(reader["ConferenceMediaReferenceId"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferenceMediaReference.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
          if(reader["LanguageId"] != DBNull.Value)
              _conferenceMediaReference.LanguageId = Convert.ToInt32(reader["LanguageId"]);
          if(reader["ReferenceOrder"] != DBNull.Value)
              _conferenceMediaReference.ReferenceOrder = Convert.ToInt32(reader["ReferenceOrder"]);
          if(reader["Title"] != DBNull.Value)
              _conferenceMediaReference.Title = Convert.ToString(reader["Title"]);
          if(reader["ReferenceUrl"] != DBNull.Value)
              _conferenceMediaReference.ReferenceUrl = Convert.ToString(reader["ReferenceUrl"]);
          if(reader["ReferenceName"] != DBNull.Value)
              _conferenceMediaReference.ReferenceName = Convert.ToString(reader["ReferenceName"]);
          if(reader["ReferenceLogo"] != DBNull.Value)
              _conferenceMediaReference.ReferenceLogo = Convert.ToString(reader["ReferenceLogo"]);
          if(reader["PublishingDate"] != DBNull.Value)
              _conferenceMediaReference.PublishingDate = Convert.ToDateTime(reader["PublishingDate"]);
      _conferenceMediaReference.NewRecord = false;             }             reader.Close();
      return _conferenceMediaReference;
 }