private void btnSave_Click(object sender, RoutedEventArgs e) { UserModel userModel = new UserModel(tbxFirstName.Text, tbxLastName.Text, tbxPasswordFirst.Password, tbxEmail.Text, tbxTele.Text); if (AddUser.ValidateAddUser(tbxFirstName, tbxLastName, tbxPasswordFirst, tbxPasswordSecond, tbxEmail, tbxTele)) { if (cbxBoss.IsChecked == true) { AddUser.AddBoss(userModel); AddUser.ClearText(tbxFirstName, tbxLastName, tbxPasswordFirst, tbxPasswordSecond, tbxEmail, tbxTele, cbxBoss); cbUser.Items.Clear(); HandleItems.FillUserList(cbUser); } else { AddUser.AddNewUser(userModel); AddUser.ClearText(tbxFirstName, tbxLastName, tbxPasswordFirst, tbxPasswordSecond, tbxEmail, tbxTele, cbxBoss); cbUser.Items.Clear(); HandleItems.FillUserList(cbUser); } } }