Esempio n. 1
0
 public CountryRegion GetByID(string _countryRegionCode)
 {
     CountryRegionDAC _countryRegionComponent = new CountryRegionDAC();
      IDataReader reader = _countryRegionComponent.GetByIDCountryRegion(_countryRegionCode);
      CountryRegion _countryRegion = null;
      while(reader.Read())
      {
          _countryRegion = new CountryRegion();
          if(reader["CountryRegionCode"] != DBNull.Value)
              _countryRegion.CountryRegionCode = Convert.ToString(reader["CountryRegionCode"]);
          if(reader["Name"] != DBNull.Value)
              _countryRegion.Name = Convert.ToString(reader["Name"]);
          if(reader["ModifiedDate"] != DBNull.Value)
              _countryRegion.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _countryRegion.NewRecord = false;             }             reader.Close();
      return _countryRegion;
 }
Esempio n. 2
0
 public List<CountryRegion> GetAll()
 {
     CountryRegionDAC _countryRegionComponent = new CountryRegionDAC();
      IDataReader reader =  _countryRegionComponent.GetAllCountryRegion().CreateDataReader();
      List<CountryRegion> _countryRegionList = new List<CountryRegion>();
      while(reader.Read())
      {
      if(_countryRegionList == null)
          _countryRegionList = new List<CountryRegion>();
          CountryRegion _countryRegion = new CountryRegion();
          if(reader["CountryRegionCode"] != DBNull.Value)
              _countryRegion.CountryRegionCode = Convert.ToString(reader["CountryRegionCode"]);
          if(reader["Name"] != DBNull.Value)
              _countryRegion.Name = Convert.ToString(reader["Name"]);
          if(reader["ModifiedDate"] != DBNull.Value)
              _countryRegion.ModifiedDate = Convert.ToDateTime(reader["ModifiedDate"]);
      _countryRegion.NewRecord = false;
      _countryRegionList.Add(_countryRegion);
      }             reader.Close();
      return _countryRegionList;
 }
Esempio n. 3
0
 public bool Update(CountryRegion countryregion ,string old_countryRegionCode)
 {
     CountryRegionDAC countryregionComponent = new CountryRegionDAC();
     return countryregionComponent.UpdateCountryRegion( countryregion.CountryRegionCode,  countryregion.Name,  countryregion.ModifiedDate,  old_countryRegionCode);
 }
Esempio n. 4
0
 public bool Insert(string CountryRegionCode, string Name)
 {
     CountryRegionDAC countryregionComponent = new CountryRegionDAC();
      return countryregionComponent.InsertNewCountryRegion(CountryRegionCode, Name, DateTime.Today);
 }
Esempio n. 5
0
 public bool Insert(CountryRegion countryregion)
 {
     CountryRegionDAC countryregionComponent = new CountryRegionDAC();
     return countryregionComponent.InsertNewCountryRegion( countryregion.CountryRegionCode,  countryregion.Name,  countryregion.ModifiedDate);
 }
Esempio n. 6
0
 public void Delete(string Original_CountryRegionCode)
 {
     CountryRegionDAC countryregionComponent = new CountryRegionDAC();
     countryregionComponent.DeleteCountryRegion(Original_CountryRegionCode);
 }
Esempio n. 7
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     CountryRegionDAC countryregioncomponent = new CountryRegionDAC();
     return countryregioncomponent.UpdateDataset(dataset);
 }
Esempio n. 8
0
 public bool Update(string CountryRegionCode, string Name, string Original_CountryRegionCode)
 {
     CountryRegionDAC countryregionComponent = new CountryRegionDAC();
     return countryregionComponent.UpdateCountryRegion(CountryRegionCode, Name, DateTime.Today, Original_CountryRegionCode);
 }