Ejemplo n.º 1
0
 public bool Insert(EducationType educationtype)
 {
     int autonumber = 0;
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     bool endedSuccessfuly = educationtypeComponent.InsertNewEducationType( ref autonumber,  educationtype.EducationTypeName);
     if(endedSuccessfuly)
     {
         educationtype.EducationTypeId = autonumber;
     }
     return endedSuccessfuly;
 }
Ejemplo n.º 2
0
 public EducationType GetByID(int _educationTypeId)
 {
     EducationTypeDAC _educationTypeComponent = new EducationTypeDAC();
      IDataReader reader = _educationTypeComponent.GetByIDEducationType(_educationTypeId);
      EducationType _educationType = null;
      while(reader.Read())
      {
          _educationType = new EducationType();
          if(reader["EducationTypeId"] != DBNull.Value)
              _educationType.EducationTypeId = Convert.ToInt32(reader["EducationTypeId"]);
          if(reader["EducationTypeName"] != DBNull.Value)
              _educationType.EducationTypeName = Convert.ToString(reader["EducationTypeName"]);
      _educationType.NewRecord = false;             }             reader.Close();
      return _educationType;
 }
Ejemplo n.º 3
0
 public List<EducationType> GetAll()
 {
     EducationTypeDAC _educationTypeComponent = new EducationTypeDAC();
      IDataReader reader =  _educationTypeComponent.GetAllEducationType().CreateDataReader();
      List<EducationType> _educationTypeList = new List<EducationType>();
      while(reader.Read())
      {
      if(_educationTypeList == null)
          _educationTypeList = new List<EducationType>();
          EducationType _educationType = new EducationType();
          if(reader["EducationTypeId"] != DBNull.Value)
              _educationType.EducationTypeId = Convert.ToInt32(reader["EducationTypeId"]);
          if(reader["EducationTypeName"] != DBNull.Value)
              _educationType.EducationTypeName = Convert.ToString(reader["EducationTypeName"]);
      _educationType.NewRecord = false;
      _educationTypeList.Add(_educationType);
      }             reader.Close();
      return _educationTypeList;
 }
Ejemplo n.º 4
0
 public bool Update(EducationType educationtype ,int old_educationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     return educationtypeComponent.UpdateEducationType( educationtype.EducationTypeName,  old_educationTypeId);
 }
Ejemplo n.º 5
0
        public bool Insert( string EducationTypeName)
        {
            EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
            int EducationTypeId = 0;

            return educationtypeComponent.InsertNewEducationType( ref EducationTypeId,  EducationTypeName);
        }
Ejemplo n.º 6
0
 public void Delete(int Original_EducationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     educationtypeComponent.DeleteEducationType(Original_EducationTypeId);
 }
Ejemplo n.º 7
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     EducationTypeDAC educationtypecomponent = new EducationTypeDAC();
     return educationtypecomponent.UpdateDataset(dataset);
 }
Ejemplo n.º 8
0
 public bool Update( string EducationTypeName,  int Original_EducationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     return educationtypeComponent.UpdateEducationType( EducationTypeName,  Original_EducationTypeId);
 }