예제 #1
0
 public List<PersonWorkExperience> GetAll()
 {
     PersonWorkExperienceDAC _personWorkExperienceComponent = new PersonWorkExperienceDAC();
      IDataReader reader =  _personWorkExperienceComponent.GetAllPersonWorkExperience().CreateDataReader();
      List<PersonWorkExperience> _personWorkExperienceList = new List<PersonWorkExperience>();
      while(reader.Read())
      {
      if(_personWorkExperienceList == null)
          _personWorkExperienceList = new List<PersonWorkExperience>();
          PersonWorkExperience _personWorkExperience = new PersonWorkExperience();
          if(reader["PersonWorkExperienceId"] != DBNull.Value)
              _personWorkExperience.PersonWorkExperienceId = Convert.ToInt32(reader["PersonWorkExperienceId"]);
          if(reader["PersonId"] != DBNull.Value)
              _personWorkExperience.PersonId = Convert.ToInt32(reader["PersonId"]);
          if(reader["Employer"] != DBNull.Value)
              _personWorkExperience.Employer = Convert.ToString(reader["Employer"]);
          if(reader["PositionHeld"] != DBNull.Value)
              _personWorkExperience.PositionHeld = Convert.ToString(reader["PositionHeld"]);
          if(reader["Responsibilities"] != DBNull.Value)
              _personWorkExperience.Responsibilities = Convert.ToString(reader["Responsibilities"]);
          if(reader["StartDate"] != DBNull.Value)
              _personWorkExperience.StartDate = Convert.ToDateTime(reader["StartDate"]);
          if(reader["EndDate"] != DBNull.Value)
              _personWorkExperience.EndDate = Convert.ToDateTime(reader["EndDate"]);
      _personWorkExperience.NewRecord = false;
      _personWorkExperienceList.Add(_personWorkExperience);
      }             reader.Close();
      return _personWorkExperienceList;
 }
예제 #2
0
 public PersonWorkExperience GetByID(int _personWorkExperienceId)
 {
     PersonWorkExperienceDAC _personWorkExperienceComponent = new PersonWorkExperienceDAC();
      IDataReader reader = _personWorkExperienceComponent.GetByIDPersonWorkExperience(_personWorkExperienceId);
      PersonWorkExperience _personWorkExperience = null;
      while(reader.Read())
      {
          _personWorkExperience = new PersonWorkExperience();
          if(reader["PersonWorkExperienceId"] != DBNull.Value)
              _personWorkExperience.PersonWorkExperienceId = Convert.ToInt32(reader["PersonWorkExperienceId"]);
          if(reader["PersonId"] != DBNull.Value)
              _personWorkExperience.PersonId = Convert.ToInt32(reader["PersonId"]);
          if(reader["Employer"] != DBNull.Value)
              _personWorkExperience.Employer = Convert.ToString(reader["Employer"]);
          if(reader["PositionHeld"] != DBNull.Value)
              _personWorkExperience.PositionHeld = Convert.ToString(reader["PositionHeld"]);
          if(reader["Responsibilities"] != DBNull.Value)
              _personWorkExperience.Responsibilities = Convert.ToString(reader["Responsibilities"]);
          if(reader["StartDate"] != DBNull.Value)
              _personWorkExperience.StartDate = Convert.ToDateTime(reader["StartDate"]);
          if(reader["EndDate"] != DBNull.Value)
              _personWorkExperience.EndDate = Convert.ToDateTime(reader["EndDate"]);
      _personWorkExperience.NewRecord = false;             }             reader.Close();
      return _personWorkExperience;
 }
예제 #3
0
 public bool Insert(PersonWorkExperience personworkexperience)
 {
     int autonumber = 0;
     PersonWorkExperienceDAC personworkexperienceComponent = new PersonWorkExperienceDAC();
     bool endedSuccessfuly = personworkexperienceComponent.InsertNewPersonWorkExperience( ref autonumber,  personworkexperience.PersonId,  personworkexperience.Employer,  personworkexperience.PositionHeld,  personworkexperience.Responsibilities,  personworkexperience.StartDate,  personworkexperience.EndDate);
     if(endedSuccessfuly)
     {
         personworkexperience.PersonWorkExperienceId = autonumber;
     }
     return endedSuccessfuly;
 }
예제 #4
0
 public void Delete(int Original_PersonWorkExperienceId)
 {
     PersonWorkExperienceDAC personworkexperienceComponent = new PersonWorkExperienceDAC();
     personworkexperienceComponent.DeletePersonWorkExperience(Original_PersonWorkExperienceId);
 }
예제 #5
0
 public int UpdateDataset(System.Data.DataSet dataset)
 {
     PersonWorkExperienceDAC personworkexperiencecomponent = new PersonWorkExperienceDAC();
     return personworkexperiencecomponent.UpdateDataset(dataset);
 }
예제 #6
0
 public bool Update( int PersonId,  string Employer,  string PositionHeld,  string Responsibilities,  DateTime StartDate,  DateTime EndDate,  int Original_PersonWorkExperienceId)
 {
     PersonWorkExperienceDAC personworkexperienceComponent = new PersonWorkExperienceDAC();
     return personworkexperienceComponent.UpdatePersonWorkExperience( PersonId,  Employer,  PositionHeld,  Responsibilities,  StartDate,  EndDate,  Original_PersonWorkExperienceId);
 }
예제 #7
0
 public bool Update(PersonWorkExperience personworkexperience ,int old_personWorkExperienceId)
 {
     PersonWorkExperienceDAC personworkexperienceComponent = new PersonWorkExperienceDAC();
     return personworkexperienceComponent.UpdatePersonWorkExperience( personworkexperience.PersonId,  personworkexperience.Employer,  personworkexperience.PositionHeld,  personworkexperience.Responsibilities,  personworkexperience.StartDate,  personworkexperience.EndDate,  old_personWorkExperienceId);
 }
예제 #8
0
        public bool Insert( int PersonId,  string Employer,  string PositionHeld,  string Responsibilities,  DateTime StartDate,  DateTime EndDate)
        {
            PersonWorkExperienceDAC personworkexperienceComponent = new PersonWorkExperienceDAC();
            int PersonWorkExperienceId = 0;

            return personworkexperienceComponent.InsertNewPersonWorkExperience( ref PersonWorkExperienceId,  PersonId,  Employer,  PositionHeld,  Responsibilities,  StartDate,  EndDate);
        }