private void btn_UpdateNurse_Click(object sender, RoutedEventArgs e) { if (nurselected == null) { return; } String firstname = fnametxt_nurseUpdate.Text; String lastname = lnametxt_nurseUpdate.Text; String username = unametxt_nurseUpdate.Text; String password = passtxt_nurseUpdate.Password; String experience = spectxt_nurseUpdate.Text; String phone = cellno_nurseUpdate.Text; DateTime dob = (DateTime)datepicker_nurseUpdate.SelectedDate; int salary = int.Parse(saltxt_nurseUpdate.Text); String gender = "female"; String type = "nurse"; nurselected.Employee.emp_firstname = firstname; nurselected.Employee.emp_lastname = lastname; nurselected.Employee.emp_phone = phone; nurselected.Employee.emp_salary = salary; nurselected.Employee.emp_gender = gender; nurselected.Employee.emp_dob = dob; nurselected.nurse_experience = experience; nurselected.Employee.User.user_name = username; nurselected.Employee.User.user_password = password; nurselected.Employee.User.user_type = type; hmsfac.updateNurse(nurselected); dataGrid_Nurse.Items.Refresh(); roomList = hmsfac.getRoom(); dataGrid_Room.ItemsSource = roomList; this.fnametxt_nurseUpdate.Text = ""; this.lnametxt_nurseUpdate.Text = ""; this.unametxt_nurseUpdate.Text = ""; this.passtxt_nurseUpdate.Password = ""; this.datepicker_nurseUpdate.Text = ""; this.cellno_nurseUpdate.Text = ""; this.spectxt_nurseUpdate.Text = ""; this.saltxt_nurseUpdate.Text = ""; this.nurse_btnUpdate.IsEnabled = false; }