コード例 #1
0
 public List<ConferenceRegistrationType> GetAll()
 {
     ConferenceRegistrationTypeDAC _conferenceRegistrationTypeComponent = new ConferenceRegistrationTypeDAC();
      IDataReader reader =  _conferenceRegistrationTypeComponent.GetAllConferenceRegistrationType().CreateDataReader();
      List<ConferenceRegistrationType> _conferenceRegistrationTypeList = new List<ConferenceRegistrationType>();
      while(reader.Read())
      {
      if(_conferenceRegistrationTypeList == null)
          _conferenceRegistrationTypeList = new List<ConferenceRegistrationType>();
          ConferenceRegistrationType _conferenceRegistrationType = new ConferenceRegistrationType();
          if(reader["ConferenceRegistrationTypeId"] != DBNull.Value)
              _conferenceRegistrationType.ConferenceRegistrationTypeId = Convert.ToInt32(reader["ConferenceRegistrationTypeId"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferenceRegistrationType.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
          if(reader["Name"] != DBNull.Value)
              _conferenceRegistrationType.Name = Convert.ToString(reader["Name"]);
          if(reader["Fee"] != DBNull.Value)
              _conferenceRegistrationType.Fee = Convert.ToDecimal(reader["Fee"]);
          if (reader["GroupName"] != DBNull.Value)
              _conferenceRegistrationType.GroupName = Convert.ToString(reader["GroupName"]);
          if (reader["StartDate"] != DBNull.Value)
              _conferenceRegistrationType.StartDate = Convert.ToDateTime(reader["StartDate"]);
          if (reader["EndDate"] != DBNull.Value)
              _conferenceRegistrationType.EndDate = Convert.ToDateTime(reader["EndDate"]);
          if (reader["EarlyRegistrationEndDate"] != DBNull.Value)
              _conferenceRegistrationType.EarlyRegistrationEndDate = Convert.ToDateTime(reader["EarlyRegistrationEndDate"]);
          if (reader["LateFee"] != DBNull.Value)
              _conferenceRegistrationType.LateFee = Convert.ToDecimal(reader["LateFee"]);
          if (reader["ConferenceScheduleID"] != DBNull.Value)
              _conferenceRegistrationType.ConferenceScheduleID = Convert.ToInt32(reader["ConferenceScheduleID"]);
          if (reader["OfferStartDate"] != DBNull.Value)
              _conferenceRegistrationType.OfferStartDate = Convert.ToDateTime(reader["OfferStartDate"]);
          if (reader["OfferEndDate"] != DBNull.Value)
              _conferenceRegistrationType.OfferEndDate = Convert.ToDateTime(reader["OfferEndDate"]);
          if (reader["OfferFee"] != DBNull.Value)
              _conferenceRegistrationType.OfferFee = Convert.ToDecimal(reader["OfferFee"]);
          if (reader["HaveOffer"] != DBNull.Value)
              _conferenceRegistrationType.HaveOffer = Convert.ToBoolean(reader["HaveOffer"]);
          if (reader["MustRegister"] != DBNull.Value)
              _conferenceRegistrationType.MustRegister = Convert.ToBoolean(reader["MustRegister"]);
      _conferenceRegistrationType.NewRecord = false;
      _conferenceRegistrationTypeList.Add(_conferenceRegistrationType);
      }             reader.Close();
      return _conferenceRegistrationTypeList;
 }
コード例 #2
0
 public bool Insert(ConferenceRegistrationType conferenceregistrationtype)
 {
     int autonumber = 0;
     ConferenceRegistrationTypeDAC conferenceregistrationtypeComponent = new ConferenceRegistrationTypeDAC();
     bool endedSuccessfuly = conferenceregistrationtypeComponent.InsertNewConferenceRegistrationType(ref autonumber, conferenceregistrationtype.ConferenceId, conferenceregistrationtype.Name, conferenceregistrationtype.Fee, conferenceregistrationtype.GroupName, conferenceregistrationtype.StartDate, conferenceregistrationtype.EndDate, conferenceregistrationtype.EarlyRegistrationEndDate, conferenceregistrationtype.LateFee, conferenceregistrationtype.ConferenceScheduleID, conferenceregistrationtype.OfferStartDate, conferenceregistrationtype.OfferEndDate, conferenceregistrationtype.OfferFee, conferenceregistrationtype.HaveOffer, conferenceregistrationtype.MustRegister);
     if(endedSuccessfuly)
     {
         conferenceregistrationtype.ConferenceRegistrationTypeId = autonumber;
     }
     return endedSuccessfuly;
 }
コード例 #3
0
 public bool Update(ConferenceRegistrationType conferenceregistrationtype ,int old_conferenceRegistrationTypeId)
 {
     ConferenceRegistrationTypeDAC conferenceregistrationtypeComponent = new ConferenceRegistrationTypeDAC();
     return conferenceregistrationtypeComponent.UpdateConferenceRegistrationType(conferenceregistrationtype.ConferenceId, conferenceregistrationtype.Name, conferenceregistrationtype.Fee, conferenceregistrationtype.GroupName, conferenceregistrationtype.StartDate, conferenceregistrationtype.EndDate, conferenceregistrationtype.EarlyRegistrationEndDate, conferenceregistrationtype.LateFee, conferenceregistrationtype.ConferenceScheduleID, conferenceregistrationtype.OfferStartDate, conferenceregistrationtype.OfferEndDate, conferenceregistrationtype.OfferFee, conferenceregistrationtype.HaveOffer, conferenceregistrationtype.MustRegister, old_conferenceRegistrationTypeId);
 }
コード例 #4
0
 public ConferenceRegistrationType GetByID(int _conferenceRegistrationTypeId)
 {
     ConferenceRegistrationTypeDAC _conferenceRegistrationTypeComponent = new ConferenceRegistrationTypeDAC();
      IDataReader reader = _conferenceRegistrationTypeComponent.GetByIDConferenceRegistrationType(_conferenceRegistrationTypeId);
      ConferenceRegistrationType _conferenceRegistrationType = null;
      while(reader.Read())
      {
          _conferenceRegistrationType = new ConferenceRegistrationType();
          if(reader["ConferenceRegistrationTypeId"] != DBNull.Value)
              _conferenceRegistrationType.ConferenceRegistrationTypeId = Convert.ToInt32(reader["ConferenceRegistrationTypeId"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _conferenceRegistrationType.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
          if(reader["Name"] != DBNull.Value)
              _conferenceRegistrationType.Name = Convert.ToString(reader["Name"]);
          if(reader["Fee"] != DBNull.Value)
              _conferenceRegistrationType.Fee = Convert.ToDecimal(reader["Fee"]);
          if (reader["GroupName"] != DBNull.Value)
              _conferenceRegistrationType.GroupName = Convert.ToString(reader["GroupName"]);
          if (reader["StartDate"] != DBNull.Value)
              _conferenceRegistrationType.StartDate = Convert.ToDateTime(reader["StartDate"]);
          if (reader["EndDate"] != DBNull.Value)
              _conferenceRegistrationType.EndDate = Convert.ToDateTime(reader["EndDate"]);
          if (reader["EarlyRegistrationEndDate"] != DBNull.Value)
              _conferenceRegistrationType.EarlyRegistrationEndDate = Convert.ToDateTime(reader["EarlyRegistrationEndDate"]);
          if (reader["LateFee"] != DBNull.Value)
              _conferenceRegistrationType.LateFee = Convert.ToDecimal(reader["LateFee"]);
          if (reader["ConferenceScheduleID"] != DBNull.Value)
              _conferenceRegistrationType.ConferenceScheduleID = Convert.ToInt32(reader["ConferenceScheduleID"]);
          if (reader["OfferStartDate"] != DBNull.Value)
              _conferenceRegistrationType.OfferStartDate = Convert.ToDateTime(reader["OfferStartDate"]);
          if (reader["OfferEndDate"] != DBNull.Value)
              _conferenceRegistrationType.OfferEndDate = Convert.ToDateTime(reader["OfferEndDate"]);
          if (reader["OfferFee"] != DBNull.Value)
              _conferenceRegistrationType.OfferFee = Convert.ToDecimal(reader["OfferFee"]);
          if (reader["HaveOffer"] != DBNull.Value)
              _conferenceRegistrationType.HaveOffer = Convert.ToBoolean(reader["HaveOffer"]);
          if (reader["MustRegister"] != DBNull.Value)
              _conferenceRegistrationType.MustRegister = Convert.ToBoolean(reader["MustRegister"]);
      _conferenceRegistrationType.NewRecord = false;             }             reader.Close();
      return _conferenceRegistrationType;
 }