예제 #1
0
 public List<VenuesLanguage> GetAll(int parentID)
 {
     VenuesLanguageDAC _venuesLanguageComponent = new VenuesLanguageDAC();
     IDataReader reader = _venuesLanguageComponent.GetAllVenuesLanguage("parentID=" + parentID).CreateDataReader();
     List<VenuesLanguage> _venuesLanguageList = new List<VenuesLanguage>();
     while (reader.Read())
     {
         if (_venuesLanguageList == null)
             _venuesLanguageList = new List<VenuesLanguage>();
         VenuesLanguage _venuesLanguage = new VenuesLanguage();
         if (reader["ID"] != DBNull.Value)
             _venuesLanguage.ID = Convert.ToInt32(reader["ID"]);
         if (reader["Name"] != DBNull.Value)
             _venuesLanguage.Name = Convert.ToString(reader["Name"]);
         if (reader["Description"] != DBNull.Value)
             _venuesLanguage.Description = Convert.ToString(reader["Description"]);
         if (reader["Location"] != DBNull.Value)
             _venuesLanguage.Location = Convert.ToString(reader["Location"]);
         if (reader["Star"] != DBNull.Value)
             _venuesLanguage.Star = Convert.ToInt32(reader["Star"]);
         if (reader["URL"] != DBNull.Value)
             _venuesLanguage.URL = Convert.ToString(reader["URL"]);
         if (reader["Phone"] != DBNull.Value)
             _venuesLanguage.Phone = Convert.ToString(reader["Phone"]);
         if (reader["Fax"] != DBNull.Value)
             _venuesLanguage.Fax = Convert.ToString(reader["Fax"]);
         if (reader["Email"] != DBNull.Value)
             _venuesLanguage.Email = Convert.ToString(reader["Email"]);
         if (reader["LanguageID"] != DBNull.Value)
             _venuesLanguage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
         if (reader["parentID"] != DBNull.Value)
             _venuesLanguage.parentID = Convert.ToInt32(reader["parentID"]);
         _venuesLanguage.NewRecord = false;
         _venuesLanguageList.Add(_venuesLanguage);
     } reader.Close();
     return _venuesLanguageList;
 }
예제 #2
0
 public bool Insert(VenuesLanguage venueslanguage)
 {
     int autonumber = 0;
     VenuesLanguageDAC venueslanguageComponent = new VenuesLanguageDAC();
     bool endedSuccessfuly = venueslanguageComponent.InsertNewVenuesLanguage( ref autonumber,  venueslanguage.Name,  venueslanguage.Description,  venueslanguage.Location,  venueslanguage.Star,  venueslanguage.URL,  venueslanguage.Phone,  venueslanguage.Fax,  venueslanguage.Email,  venueslanguage.LanguageID,  venueslanguage.parentID);
     if(endedSuccessfuly)
     {
         venueslanguage.ID = autonumber;
     }
     return endedSuccessfuly;
 }
예제 #3
0
 public bool Update(VenuesLanguage venueslanguage ,int old_iD)
 {
     VenuesLanguageDAC venueslanguageComponent = new VenuesLanguageDAC();
     return venueslanguageComponent.UpdateVenuesLanguage( venueslanguage.Name,  venueslanguage.Description,  venueslanguage.Location,  venueslanguage.Star,  venueslanguage.URL,  venueslanguage.Phone,  venueslanguage.Fax,  venueslanguage.Email,  venueslanguage.LanguageID,  venueslanguage.parentID,  old_iD);
 }
예제 #4
0
 public VenuesLanguage GetByID(int _iD)
 {
     VenuesLanguageDAC _venuesLanguageComponent = new VenuesLanguageDAC();
      IDataReader reader = _venuesLanguageComponent.GetByIDVenuesLanguage(_iD);
      VenuesLanguage _venuesLanguage = null;
      while(reader.Read())
      {
          _venuesLanguage = new VenuesLanguage();
          if(reader["ID"] != DBNull.Value)
              _venuesLanguage.ID = Convert.ToInt32(reader["ID"]);
          if(reader["Name"] != DBNull.Value)
              _venuesLanguage.Name = Convert.ToString(reader["Name"]);
          if(reader["Description"] != DBNull.Value)
              _venuesLanguage.Description = Convert.ToString(reader["Description"]);
          if(reader["Location"] != DBNull.Value)
              _venuesLanguage.Location = Convert.ToString(reader["Location"]);
          if(reader["Star"] != DBNull.Value)
              _venuesLanguage.Star = Convert.ToInt32(reader["Star"]);
          if(reader["URL"] != DBNull.Value)
              _venuesLanguage.URL = Convert.ToString(reader["URL"]);
          if(reader["Phone"] != DBNull.Value)
              _venuesLanguage.Phone = Convert.ToString(reader["Phone"]);
          if(reader["Fax"] != DBNull.Value)
              _venuesLanguage.Fax = Convert.ToString(reader["Fax"]);
          if(reader["Email"] != DBNull.Value)
              _venuesLanguage.Email = Convert.ToString(reader["Email"]);
          if(reader["LanguageID"] != DBNull.Value)
              _venuesLanguage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
          if(reader["parentID"] != DBNull.Value)
              _venuesLanguage.parentID = Convert.ToInt32(reader["parentID"]);
      _venuesLanguage.NewRecord = false;             }             reader.Close();
      return _venuesLanguage;
 }