private void PopulateFields() { DataTable doctorDT = doctor.GetDoctor(doctorId); if (doctorDT.Rows != null && doctorDT.Rows.Count != 0) { DataRow row = doctorDT.Rows[0]; labelName.Text = row["fname"].ToString() + " " + row["lname"].ToString(); labelSpecialty.Text = row["specialty"].ToString(); labelDOB.Text = row["dob"].ToString(); labelSalary.Text = row["salary"].ToString(); labelSex.Text = row["sex"].ToString(); } }
private void PopulateFields() { DataTable dt = doctor.GetDoctor(doctorId); DataRow row = dt.Rows[0]; String firstName = row["fname"].ToString(); String lastName = row["lname"].ToString(); String dob = row["dob"].ToString(); String username = row["username"].ToString(); String password = row["password"].ToString(); String salary = row["salary"].ToString(); String specialty = row["specialty"].ToString(); String sex = row["sex"].ToString(); textBoxFname.Text = firstName; textBoxLname.Text = lastName; doctorDOBPicker.Value = Convert.ToDateTime(dob); textBoxUsername.Text = username; textBoxPassword.Text = password; textBoxSalary.Text = salary; textBoxSpecialty.Text = specialty; comboBoxSex.Text = sex; }