public List<ConferenceRegistrationTypeLanguage> GetAll(int ParentID)
 {
     ConferenceRegistrationTypeLanguageDAC _conferenceRegistrationTypeLanguageComponent = new ConferenceRegistrationTypeLanguageDAC();
     IDataReader reader = _conferenceRegistrationTypeLanguageComponent.GetAllConferenceRegistrationTypeLanguage("ConferenceRegistrationTypeParentId="+ParentID).CreateDataReader();
     List<ConferenceRegistrationTypeLanguage> _conferenceRegistrationTypeLanguageList = new List<ConferenceRegistrationTypeLanguage>();
     while (reader.Read())
     {
         if (_conferenceRegistrationTypeLanguageList == null)
             _conferenceRegistrationTypeLanguageList = new List<ConferenceRegistrationTypeLanguage>();
         ConferenceRegistrationTypeLanguage _conferenceRegistrationTypeLanguage = new ConferenceRegistrationTypeLanguage();
         if (reader["ConferenceRegistrationTypeId"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.ConferenceRegistrationTypeId = Convert.ToInt32(reader["ConferenceRegistrationTypeId"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         if (reader["Name"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.Name = Convert.ToString(reader["Name"]);
         if (reader["Fee"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.Fee = Convert.ToDecimal(reader["Fee"]);
         if (reader["ConferenceRegistrationTypeParentId"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.ConferenceRegistrationTypeParentId = Convert.ToInt32(reader["ConferenceRegistrationTypeParentId"]);
         if (reader["LanguageID"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
         if (reader["Description"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.Description = Convert.ToString(reader["Description"]);
         if (reader["OfferMessage"] != DBNull.Value)
             _conferenceRegistrationTypeLanguage.OfferMessage = Convert.ToString(reader["OfferMessage"]);
         _conferenceRegistrationTypeLanguage.NewRecord = false;
         _conferenceRegistrationTypeLanguageList.Add(_conferenceRegistrationTypeLanguage);
     } reader.Close();
     return _conferenceRegistrationTypeLanguageList;
 }
 public ConferenceRegistrationTypeLanguage GetByID(int _conferenceRegistrationTypeId)
 {
     ConferenceRegistrationTypeLanguageDAC _conferenceRegistrationTypeLanguageComponent = new ConferenceRegistrationTypeLanguageDAC();
      IDataReader reader = _conferenceRegistrationTypeLanguageComponent.GetByIDConferenceRegistrationTypeLanguage(_conferenceRegistrationTypeId);
      ConferenceRegistrationTypeLanguage _conferenceRegistrationTypeLanguage = null;
      while(reader.Read())
      {
          _conferenceRegistrationTypeLanguage = new ConferenceRegistrationTypeLanguage();
          if(reader["ConferenceRegistrationTypeId"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.ConferenceRegistrationTypeId = Convert.ToInt32(reader["ConferenceRegistrationTypeId"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
          if(reader["Name"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.Name = Convert.ToString(reader["Name"]);
          if(reader["Fee"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.Fee = Convert.ToDecimal(reader["Fee"]);
          if(reader["ConferenceRegistrationTypeParentId"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.ConferenceRegistrationTypeParentId = Convert.ToInt32(reader["ConferenceRegistrationTypeParentId"]);
          if(reader["LanguageID"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
          if (reader["Description"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.Description = Convert.ToString(reader["Description"]);
          if (reader["OfferMessage"] != DBNull.Value)
              _conferenceRegistrationTypeLanguage.OfferMessage = Convert.ToString(reader["OfferMessage"]);
      _conferenceRegistrationTypeLanguage.NewRecord = false;             }             reader.Close();
      return _conferenceRegistrationTypeLanguage;
 }
 public bool Update(ConferenceRegistrationTypeLanguage conferenceregistrationtypelanguage ,int old_conferenceRegistrationTypeId)
 {
     ConferenceRegistrationTypeLanguageDAC conferenceregistrationtypelanguageComponent = new ConferenceRegistrationTypeLanguageDAC();
     return conferenceregistrationtypelanguageComponent.UpdateConferenceRegistrationTypeLanguage(conferenceregistrationtypelanguage.ConferenceId, conferenceregistrationtypelanguage.Name, conferenceregistrationtypelanguage.Fee, conferenceregistrationtypelanguage.ConferenceRegistrationTypeParentId, conferenceregistrationtypelanguage.LanguageID, conferenceregistrationtypelanguage.Description, conferenceregistrationtypelanguage.OfferMessage, old_conferenceRegistrationTypeId);
 }
 public bool Insert(ConferenceRegistrationTypeLanguage conferenceregistrationtypelanguage)
 {
     int autonumber = 0;
     ConferenceRegistrationTypeLanguageDAC conferenceregistrationtypelanguageComponent = new ConferenceRegistrationTypeLanguageDAC();
     bool endedSuccessfuly = conferenceregistrationtypelanguageComponent.InsertNewConferenceRegistrationTypeLanguage(ref autonumber, conferenceregistrationtypelanguage.ConferenceId, conferenceregistrationtypelanguage.Name, conferenceregistrationtypelanguage.Fee, conferenceregistrationtypelanguage.ConferenceRegistrationTypeParentId, conferenceregistrationtypelanguage.LanguageID, conferenceregistrationtypelanguage.Description, conferenceregistrationtypelanguage.OfferMessage);
     if(endedSuccessfuly)
     {
         conferenceregistrationtypelanguage.ConferenceRegistrationTypeId = autonumber;
     }
     return endedSuccessfuly;
 }