private void PopulateFields()
        {
            DataTable technicianDt = technician.GetTechnician(technicianId);

            if (technicianDt.Rows != null && technicianDt.Rows.Count != 0)
            {
                DataRow row = technicianDt.Rows[0];
                labelName.Text   = row["fname"].ToString() + " " + row["lname"].ToString();
                labelDOB.Text    = row["dob"].ToString();
                labelSalary.Text = row["salary"].ToString();
                labelSex.Text    = row["sex"].ToString();
            }
        }
示例#2
0
        private void PopulateFields()
        {
            DataTable dt        = technician.GetTechnician(technicianId);
            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    sex       = row["sex"].ToString();

            textBoxFname.Text    = firstName;
            textBoxLname.Text    = lastName;
            techDOB.Value        = Convert.ToDateTime(dob);
            textBoxUsername.Text = username;
            textBoxPassword.Text = password;
            textBoxSalary.Text   = salary;
            comboBoxSex.Text     = sex;
        }