public PaidStudentsDTO(PaidStudentsDTO paidStusent)
            : base(paidStusent)
        {
            LabelsText.Add("Price");

            Price = paidStusent.Price;
        }
Example #2
0
        public override TUObjectsDTO Select(int id)
        {
            TUObjectsDTO tuObject = base.Select(id);
            StudentsDTO student = (StudentsDTO)tuObject;
            PaidStudentsDTO paidStudent = new PaidStudentsDTO(student);

            dbCommand.CommandText = string.Format("Select Price From PaidStudents Where Id = {0}", id);
            dataReader = dbCommand.ExecuteReader();
            dataReader.Read();

            paidStudent.Price = dataReader.GetDouble(0);

            dataReader.Close();
            return paidStudent;
        }