Esempio n. 1
0
 public List<Travellanguage> GetAll(int ParentID)
 {
     TravellanguageDAC _travellanguageComponent = new TravellanguageDAC();
     IDataReader reader = _travellanguageComponent.GetAllTravellanguage("ParentID=" + ParentID).CreateDataReader();
     List<Travellanguage> _travellanguageList = new List<Travellanguage>();
     while (reader.Read())
     {
         if (_travellanguageList == null)
             _travellanguageList = new List<Travellanguage>();
         Travellanguage _travellanguage = new Travellanguage();
         if (reader["ID"] != DBNull.Value)
             _travellanguage.ID = Convert.ToInt32(reader["ID"]);
         if (reader["Name"] != DBNull.Value)
             _travellanguage.Name = Convert.ToString(reader["Name"]);
         if (reader["TransportationTypeID"] != DBNull.Value)
             _travellanguage.TransportationTypeID = Convert.ToInt32(reader["TransportationTypeID"]);
         if (reader["Description"] != DBNull.Value)
             _travellanguage.Description = Convert.ToString(reader["Description"]);
         if (reader["ParentID"] != DBNull.Value)
             _travellanguage.ParentID = Convert.ToInt32(reader["ParentID"]);
         if (reader["LanguageID"] != DBNull.Value)
             _travellanguage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
         _travellanguage.NewRecord = false;
         _travellanguageList.Add(_travellanguage);
     } reader.Close();
     return _travellanguageList;
 }
Esempio n. 2
0
 public Travellanguage GetByID(int _iD)
 {
     TravellanguageDAC _travellanguageComponent = new TravellanguageDAC();
      IDataReader reader = _travellanguageComponent.GetByIDTravellanguage(_iD);
      Travellanguage _travellanguage = null;
      while(reader.Read())
      {
          _travellanguage = new Travellanguage();
          if(reader["ID"] != DBNull.Value)
              _travellanguage.ID = Convert.ToInt32(reader["ID"]);
          if(reader["Name"] != DBNull.Value)
              _travellanguage.Name = Convert.ToString(reader["Name"]);
          if(reader["TransportationTypeID"] != DBNull.Value)
              _travellanguage.TransportationTypeID = Convert.ToInt32(reader["TransportationTypeID"]);
          if(reader["Description"] != DBNull.Value)
              _travellanguage.Description = Convert.ToString(reader["Description"]);
          if(reader["ParentID"] != DBNull.Value)
              _travellanguage.ParentID = Convert.ToInt32(reader["ParentID"]);
          if(reader["LanguageID"] != DBNull.Value)
              _travellanguage.LanguageID = Convert.ToInt32(reader["LanguageID"]);
      _travellanguage.NewRecord = false;             }             reader.Close();
      return _travellanguage;
 }
Esempio n. 3
0
 public void Delete(int Original_ID)
 {
     TravellanguageDAC travellanguageComponent = new TravellanguageDAC();
     travellanguageComponent.DeleteTravellanguage(Original_ID);
 }
Esempio n. 4
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     TravellanguageDAC travellanguagecomponent = new TravellanguageDAC();
     return travellanguagecomponent.UpdateDataset(dataset);
 }
Esempio n. 5
0
 public bool Update( string Name,  int TransportationTypeID,  string Description,  int ParentID,  int LanguageID,  int Original_ID)
 {
     TravellanguageDAC travellanguageComponent = new TravellanguageDAC();
     return travellanguageComponent.UpdateTravellanguage( Name,  TransportationTypeID,  Description,  ParentID,  LanguageID,  Original_ID);
 }
Esempio n. 6
0
 public bool Update(Travellanguage travellanguage ,int old_iD)
 {
     TravellanguageDAC travellanguageComponent = new TravellanguageDAC();
     return travellanguageComponent.UpdateTravellanguage( travellanguage.Name,  travellanguage.TransportationTypeID,  travellanguage.Description,  travellanguage.ParentID,  travellanguage.LanguageID,  old_iD);
 }
Esempio n. 7
0
        public bool Insert( string Name,  int TransportationTypeID,  string Description,  int ParentID,  int LanguageID)
        {
            TravellanguageDAC travellanguageComponent = new TravellanguageDAC();
            int ID = 0;

            return travellanguageComponent.InsertNewTravellanguage( ref ID,  Name,  TransportationTypeID,  Description,  ParentID,  LanguageID);
        }
Esempio n. 8
0
 public bool Insert(Travellanguage travellanguage)
 {
     int autonumber = 0;
     TravellanguageDAC travellanguageComponent = new TravellanguageDAC();
     bool endedSuccessfuly = travellanguageComponent.InsertNewTravellanguage( ref autonumber,  travellanguage.Name,  travellanguage.TransportationTypeID,  travellanguage.Description,  travellanguage.ParentID,  travellanguage.LanguageID);
     if(endedSuccessfuly)
     {
         travellanguage.ID = autonumber;
     }
     return endedSuccessfuly;
 }