Пример #1
0
        public PeopleDTO(PeopleDTO people)
            : base(people)
        {
            LabelsText.Add("FirstName");
            LabelsText.Add("MiddleName");
            LabelsText.Add("Address");
            LabelsText.Add("Phone");

            FirstName = people.FirstName;
            MiddleName = people.MiddleName;
            Address = people.Address;
            Phone = people.Phone;
        }
Пример #2
0
        public override TUObjectsDTO Select(int id)
        {
            TUObjectsDTO tuObject = base.Select(id);
            PeopleDTO people = new PeopleDTO(tuObject);

            dbCommand.CommandText = string.Format("Select FirstName, MiddleName, Address, Phone From People Where Id = {0}", id);
            dataReader = dbCommand.ExecuteReader();
            dataReader.Read();

            people.FirstName = dataReader.GetString(0);
            people.MiddleName = dataReader.GetString(1);
            people.Address = dataReader.GetString(2);
            people.Phone = dataReader.GetString(3);

            dataReader.Close();
            return people;
        }
Пример #3
0
 public WorkersDTO(PeopleDTO worker)
     : base(worker)
 {
     LabelsText.Add("Post");
     LabelsText.Add("Salary");
 }
Пример #4
0
 public LearnersDTO(PeopleDTO learner)
     : base(learner)
 {
     LabelsText.Add("LearnNumber");
 }