public BudgetStudentsDTO(BudgetStudentsDTO budgetstudent)
            : base(budgetstudent)
        {
            LabelsText.Add("Scolarship");

            Scolarship = budgetstudent.Scolarship;
        }
Esempio n. 2
0
        public override TUObjectsDTO Select(int id)
        {
            TUObjectsDTO tuObject = base.Select(id);
            StudentsDTO student = (StudentsDTO)tuObject;
            BudgetStudentsDTO budgetStudent = new BudgetStudentsDTO(student);

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

            budgetStudent.Scolarship = dataReader.GetDouble(0);

            dataReader.Close();
            return budgetStudent;
        }