コード例 #1
0
 public ConferencePrograms GetByID(int _conferenceProgramId)
 {
     ConferenceProgramsDAC _conferenceProgramsComponent = new ConferenceProgramsDAC();
      IDataReader reader = _conferenceProgramsComponent.GetByIDConferencePrograms(_conferenceProgramId);
      ConferencePrograms _conferencePrograms = null;
      while(reader.Read())
      {
          _conferencePrograms = new ConferencePrograms();
          if(reader["ConferenceProgramId"] != DBNull.Value)
              _conferencePrograms.ConferenceProgramId = Convert.ToInt32(reader["ConferenceProgramId"]);
          if(reader["ProgramName"] != DBNull.Value)
              _conferencePrograms.ProgramName = Convert.ToString(reader["ProgramName"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferencePrograms.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
      _conferencePrograms.NewRecord = false;             }             reader.Close();
      return _conferencePrograms;
 }
コード例 #2
0
 public List<ConferencePrograms> GetAllByConferenceId(int ConferenceId)
 {
     ConferenceProgramsDAC _conferenceProgramsComponent = new ConferenceProgramsDAC();
     IDataReader reader = _conferenceProgramsComponent.GetAllConferencePrograms("ConferenceId = " + ConferenceId).CreateDataReader();
     List<ConferencePrograms> _conferenceProgramsList = new List<ConferencePrograms>();
     while (reader.Read())
     {
         if (_conferenceProgramsList == null)
             _conferenceProgramsList = new List<ConferencePrograms>();
         ConferencePrograms _conferencePrograms = new ConferencePrograms();
         if (reader["ConferenceProgramId"] != DBNull.Value)
             _conferencePrograms.ConferenceProgramId = Convert.ToInt32(reader["ConferenceProgramId"]);
         if (reader["ProgramName"] != DBNull.Value)
             _conferencePrograms.ProgramName = Convert.ToString(reader["ProgramName"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _conferencePrograms.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         _conferencePrograms.NewRecord = false;
         _conferenceProgramsList.Add(_conferencePrograms);
     } reader.Close();
     return _conferenceProgramsList;
 }
コード例 #3
0
 public bool Insert(ConferencePrograms conferenceprograms)
 {
     int autonumber = 0;
     ConferenceProgramsDAC conferenceprogramsComponent = new ConferenceProgramsDAC();
     bool endedSuccessfuly = conferenceprogramsComponent.InsertNewConferencePrograms( ref autonumber,  conferenceprograms.ProgramName,  conferenceprograms.ConferenceId);
     if(endedSuccessfuly)
     {
         conferenceprograms.ConferenceProgramId = autonumber;
     }
     return endedSuccessfuly;
 }
コード例 #4
0
 public void Delete(int Original_ConferenceProgramId)
 {
     ConferenceProgramsDAC conferenceprogramsComponent = new ConferenceProgramsDAC();
     conferenceprogramsComponent.DeleteConferencePrograms(Original_ConferenceProgramId);
 }
コード例 #5
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     ConferenceProgramsDAC conferenceprogramscomponent = new ConferenceProgramsDAC();
     return conferenceprogramscomponent.UpdateDataset(dataset);
 }
コード例 #6
0
 public bool Update( string ProgramName,  int ConferenceId,  int Original_ConferenceProgramId)
 {
     ConferenceProgramsDAC conferenceprogramsComponent = new ConferenceProgramsDAC();
     return conferenceprogramsComponent.UpdateConferencePrograms( ProgramName,  ConferenceId,  Original_ConferenceProgramId);
 }
コード例 #7
0
 public bool Update(ConferencePrograms conferenceprograms ,int old_conferenceProgramId)
 {
     ConferenceProgramsDAC conferenceprogramsComponent = new ConferenceProgramsDAC();
     return conferenceprogramsComponent.UpdateConferencePrograms( conferenceprograms.ProgramName,  conferenceprograms.ConferenceId,  old_conferenceProgramId);
 }
コード例 #8
0
        public bool Insert( string ProgramName,  int ConferenceId)
        {
            ConferenceProgramsDAC conferenceprogramsComponent = new ConferenceProgramsDAC();
            int ConferenceProgramId = 0;

            return conferenceprogramsComponent.InsertNewConferencePrograms( ref ConferenceProgramId,  ProgramName,  ConferenceId);
        }