Beispiel #1
0
        public EntrantsDTO(EntrantsDTO entrant)
            : base(entrant)
        {
            LabelsText.Add("MarkSum");
            LabelsText.Add("Privilege");

            MarkSum = entrant.MarkSum;
            Privilege = entrant.Privilege;
        }
Beispiel #2
0
        public override TUObjectsDTO Select(int id)
        {
            TUObjectsDTO tuObject = base.Select(id);
            LearnersDTO lerner = (LearnersDTO)tuObject;
            EntrantsDTO entrant = new EntrantsDTO(lerner);

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

            entrant.MarkSum = dataReader.GetInt32(0);
            entrant.Privilege = dataReader.GetString(1);

            dataReader.Close();
            return entrant;
        }