コード例 #1
0
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 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
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 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
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 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
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 public bool Update(EducationType educationtype ,int old_educationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     return educationtypeComponent.UpdateEducationType( educationtype.EducationTypeName,  old_educationTypeId);
 }
コード例 #5
0
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
        public bool Insert( string EducationTypeName)
        {
            EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
            int EducationTypeId = 0;

            return educationtypeComponent.InsertNewEducationType( ref EducationTypeId,  EducationTypeName);
        }
コード例 #6
0
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 public void Delete(int Original_EducationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     educationtypeComponent.DeleteEducationType(Original_EducationTypeId);
 }
コード例 #7
0
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     EducationTypeDAC educationtypecomponent = new EducationTypeDAC();
     return educationtypecomponent.UpdateDataset(dataset);
 }
コード例 #8
0
ファイル: EducationTypeLogic.cs プロジェクト: ramyothman/RBM
 public bool Update( string EducationTypeName,  int Original_EducationTypeId)
 {
     EducationTypeDAC educationtypeComponent = new EducationTypeDAC();
     return educationtypeComponent.UpdateEducationType( EducationTypeName,  Original_EducationTypeId);
 }