Exemple #1
0
        public bool LoadData(SqlConnection cn)
        {
            ParticipantDataTableAdapter ta = new ParticipantDataTableAdapter();

            ta.Connection = cn;
            DsListShow.ParticipantDataDataTable t = ta.GetData(Iid);
            if (t.Rows.Count < 1)
            {
                Loaded = false;
                return(false);
            }
            DsListShow.ParticipantDataRow row = (DsListShow.ParticipantDataRow)t.Rows[0];
            this.Name = row.surname.ToUpper();
            if (!row.IsnameNull())
            {
                if (row.name.Length > 0)
                {
                    this.Name += " " + row.name;
                }
            }
            this.Qf    = (row.IsqfNull() ? "" : row.qf);
            this.Age   = (row.IsageNull() ? 0 : row.age);
            this.Photo = (row.IsphotoNull() ? null : ImageWorker.GetFromBytes(row.photo));
            this.Team  = row.team;
            this.Group = row.grp;
            LoadResults(cn);
            this.Loaded = true;
            return(true);
        }