コード例 #1
0
 public ConferenceCategory GetByID(int _conferenceCategoryId)
 {
     ConferenceCategoryDAC _conferenceCategoryComponent = new ConferenceCategoryDAC();
      IDataReader reader = _conferenceCategoryComponent.GetByIDConferenceCategory(_conferenceCategoryId);
      ConferenceCategory _conferenceCategory = null;
      while(reader.Read())
      {
          _conferenceCategory = new ConferenceCategory();
          if(reader["ConferenceCategoryId"] != DBNull.Value)
              _conferenceCategory.ConferenceCategoryId = Convert.ToInt32(reader["ConferenceCategoryId"]);
          if(reader["CategoryName"] != DBNull.Value)
              _conferenceCategory.CategoryName = Convert.ToString(reader["CategoryName"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferenceCategory.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
      _conferenceCategory.NewRecord = false;             }             reader.Close();
      return _conferenceCategory;
 }
コード例 #2
0
 public List<ConferenceCategory> GetAllByConferenceId(int ConferenceId)
 {
     ConferenceCategoryDAC _conferenceCategoryComponent = new ConferenceCategoryDAC();
     IDataReader reader = _conferenceCategoryComponent.GetAllConferenceCategory("ConferenceId = " + ConferenceId).CreateDataReader();
     List<ConferenceCategory> _conferenceCategoryList = new List<ConferenceCategory>();
     while (reader.Read())
     {
         if (_conferenceCategoryList == null)
             _conferenceCategoryList = new List<ConferenceCategory>();
         ConferenceCategory _conferenceCategory = new ConferenceCategory();
         if (reader["ConferenceCategoryId"] != DBNull.Value)
             _conferenceCategory.ConferenceCategoryId = Convert.ToInt32(reader["ConferenceCategoryId"]);
         if (reader["CategoryName"] != DBNull.Value)
             _conferenceCategory.CategoryName = Convert.ToString(reader["CategoryName"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _conferenceCategory.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         _conferenceCategory.NewRecord = false;
         _conferenceCategoryList.Add(_conferenceCategory);
     } reader.Close();
     return _conferenceCategoryList;
 }
コード例 #3
0
 public bool Insert(ConferenceCategory conferencecategory)
 {
     int autonumber = 0;
     ConferenceCategoryDAC conferencecategoryComponent = new ConferenceCategoryDAC();
     bool endedSuccessfuly = conferencecategoryComponent.InsertNewConferenceCategory( ref autonumber,  conferencecategory.CategoryName,  conferencecategory.ConferenceId);
     if(endedSuccessfuly)
     {
         conferencecategory.ConferenceCategoryId = autonumber;
     }
     return endedSuccessfuly;
 }
コード例 #4
0
 public void Delete(int Original_ConferenceCategoryId)
 {
     ConferenceCategoryDAC conferencecategoryComponent = new ConferenceCategoryDAC();
     conferencecategoryComponent.DeleteConferenceCategory(Original_ConferenceCategoryId);
 }
コード例 #5
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     ConferenceCategoryDAC conferencecategorycomponent = new ConferenceCategoryDAC();
     return conferencecategorycomponent.UpdateDataset(dataset);
 }
コード例 #6
0
 public bool Update( string CategoryName,  int ConferenceId,  int Original_ConferenceCategoryId)
 {
     ConferenceCategoryDAC conferencecategoryComponent = new ConferenceCategoryDAC();
     return conferencecategoryComponent.UpdateConferenceCategory( CategoryName,  ConferenceId,  Original_ConferenceCategoryId);
 }
コード例 #7
0
 public bool Update(ConferenceCategory conferencecategory ,int old_conferenceCategoryId)
 {
     ConferenceCategoryDAC conferencecategoryComponent = new ConferenceCategoryDAC();
     return conferencecategoryComponent.UpdateConferenceCategory( conferencecategory.CategoryName,  conferencecategory.ConferenceId,  old_conferenceCategoryId);
 }
コード例 #8
0
        public bool Insert( string CategoryName,  int ConferenceId)
        {
            ConferenceCategoryDAC conferencecategoryComponent = new ConferenceCategoryDAC();
            int ConferenceCategoryId = 0;

            return conferencecategoryComponent.InsertNewConferenceCategory( ref ConferenceCategoryId,  CategoryName,  ConferenceId);
        }