Example #1
0
 public List<Sponsors> GetAllByConferenceId(string ConferenceId)
 {
     SponsorsDAC _sponsorsComponent = new SponsorsDAC();
     if (string.IsNullOrEmpty(ConferenceId))
         ConferenceId = "0";
     IDataReader reader = _sponsorsComponent.GetAllSponsors(" ConferenceId = " + ConferenceId).CreateDataReader();
     List<Sponsors> _sponsorsList = new List<Sponsors>();
     while (reader.Read())
     {
         if (_sponsorsList == null)
             _sponsorsList = new List<Sponsors>();
         Sponsors _sponsors = new Sponsors();
         if (reader["SponsorId"] != DBNull.Value)
             _sponsors.SponsorId = Convert.ToInt32(reader["SponsorId"]);
         if (reader["SponsorName"] != DBNull.Value)
             _sponsors.SponsorName = Convert.ToString(reader["SponsorName"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _sponsors.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         if (reader["SponsorType"] != DBNull.Value)
             _sponsors.SponsorType = Convert.ToString(reader["SponsorType"]);
         if (reader["SponsorImage"] != DBNull.Value)
             _sponsors.SponsorImage = Convert.ToString(reader["SponsorImage"]);
         _sponsors.NewRecord = false;
         _sponsorsList.Add(_sponsors);
     } reader.Close();
     return _sponsorsList;
 }
Example #2
0
 public Sponsors GetByID(int _sponsorId)
 {
     SponsorsDAC _sponsorsComponent = new SponsorsDAC();
      IDataReader reader = _sponsorsComponent.GetByIDSponsors(_sponsorId);
      Sponsors _sponsors = null;
      while(reader.Read())
      {
          _sponsors = new Sponsors();
          if(reader["SponsorId"] != DBNull.Value)
              _sponsors.SponsorId = Convert.ToInt32(reader["SponsorId"]);
          if(reader["SponsorName"] != DBNull.Value)
              _sponsors.SponsorName = Convert.ToString(reader["SponsorName"]);
          if(reader["ConferenceId"] != DBNull.Value)
              _sponsors.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
          if(reader["SponsorType"] != DBNull.Value)
              _sponsors.SponsorType = Convert.ToString(reader["SponsorType"]);
          if(reader["SponsorImage"] != DBNull.Value)
              _sponsors.SponsorImage = Convert.ToString(reader["SponsorImage"]);
      _sponsors.NewRecord = false;             }             reader.Close();
      return _sponsors;
 }
Example #3
0
 public void Delete(int Original_SponsorId)
 {
     SponsorsDAC sponsorsComponent = new SponsorsDAC();
     sponsorsComponent.DeleteSponsors(Original_SponsorId);
 }
Example #4
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     SponsorsDAC sponsorscomponent = new SponsorsDAC();
     return sponsorscomponent.UpdateDataset(dataset);
 }
Example #5
0
 public bool Update( string SponsorName,  int ConferenceId,  string SponsorType,  string SponsorImage,  int Original_SponsorId)
 {
     SponsorsDAC sponsorsComponent = new SponsorsDAC();
     return sponsorsComponent.UpdateSponsors( SponsorName,  ConferenceId,  SponsorType,  SponsorImage,  Original_SponsorId);
 }
Example #6
0
 public bool Update(Sponsors sponsors ,int old_sponsorId)
 {
     SponsorsDAC sponsorsComponent = new SponsorsDAC();
     return sponsorsComponent.UpdateSponsors( sponsors.SponsorName,  sponsors.ConferenceId,  sponsors.SponsorType,  sponsors.SponsorImage,  old_sponsorId);
 }
Example #7
0
        public bool Insert( string SponsorName,  int ConferenceId,  string SponsorType,  string SponsorImage)
        {
            SponsorsDAC sponsorsComponent = new SponsorsDAC();
            int SponsorId = 0;

            return sponsorsComponent.InsertNewSponsors( ref SponsorId,  SponsorName,  ConferenceId,  SponsorType,  SponsorImage);
        }
Example #8
0
 public bool Insert(Sponsors sponsors)
 {
     int autonumber = 0;
     SponsorsDAC sponsorsComponent = new SponsorsDAC();
     bool endedSuccessfuly = sponsorsComponent.InsertNewSponsors( ref autonumber,  sponsors.SponsorName,  sponsors.ConferenceId,  sponsors.SponsorType,  sponsors.SponsorImage);
     if(endedSuccessfuly)
     {
         sponsors.SponsorId = autonumber;
     }
     return endedSuccessfuly;
 }