예제 #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;
 }
예제 #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;
 }
예제 #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;
 }
예제 #4
0
 public bool Update(EducationType educationtype ,int old_educationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     return educationtypeComponent.UpdateEducationType( educationtype.EducationTypeName,  old_educationTypeId);
 }
예제 #5
0
        public bool Insert( string EducationTypeName)
        {
            EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
            int EducationTypeId = 0;

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