Beispiel #1
0
        private void PersonalTrainerLoginPanel_Load(object sender, EventArgs e)
        {
            ds   = new DataSet1();
            ptta = new PersonalTrainerTableAdapter();
            ptta.Fill(ds.PersonalTrainer);

            GetPersonalTrainerAccounts();
        }
Beispiel #2
0
        public PersonalTrainer GetPersonalTrainerData(int id)
        {
            DataSet1 ds = new DataSet1();
            PersonalTrainerTableAdapter ta = new PersonalTrainerTableAdapter();

            ta.Fill(ds.PersonalTrainer);

            PersonalTrainer ptrainer = new PersonalTrainer(id);

            DataRow[] d = ds.PersonalTrainer.Select("trainer_id = '" + ptrainer.Id + "'");

            foreach (DataRow dr in d)
            {
                ptrainer.Name       = dr["name"].ToString();
                ptrainer.Address    = dr["address"].ToString();
                ptrainer.ProfilePic = dr["profilePic"].ToString();
                ptrainer.Email      = dr["email"].ToString();
            }

            return(ptrainer);
        }