//Resetuj private void Resetuj() { TextBoxId.Clear(); TextBoxNaziv.Clear(); TextBoxOpis.Clear(); Combo1.SelectedIndex = -1; }
private void Clear() { TextBoxId.Clear(); TextBoxUserName.Clear(); TextBoxPassword.Clear(); ComboBoxAdmin.SelectedIndex = -1; }
private void ButtonEffacer_OnClick(object sender, RoutedEventArgs e) { if (TextBoxNom.Text != "" & TextBoxPrenom.Text != "" & TextBoxSociete.Text != "" & TextBoxTelephone.Text != "" & TextBoxEmail.Text != "") // Si les champs ne sont pas vides, la création est impossible { SqlConnection connection = new SqlConnection(ConString); connection.Open(); // Ouvertue de la connexion SqlCommand cmdSqlCommand = new SqlCommand( "DELETE FROM dbo.Clients WHERE Id=@Id", connection); // Requête de suppression du client cmdSqlCommand.Parameters.AddWithValue("@Id", TextBoxId.Text); // Paramètre de l'Email du client if (MessageBox.Show("Oui ou Non", "Êtes vous sûr de vouloir supprimer ce client ?", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) // Boite de dialogue demandant la confirmation pour la suppression du client { cmdSqlCommand.ExecuteNonQuery(); // Execution de la requête MessageBox.Show("Le client " + TextBoxNom.Text + " " + TextBoxPrenom.Text + " " + "de la société " + TextBoxSociete.Text + " a été supprimé"); // Affichage du message après execution de la requête } FillDataGrid(); // Recharge la table Clients TextBoxId.Clear(); TextBoxNom.Clear(); // Vide le champs Nom TextBoxPrenom.Clear(); // Vide le champs Prenom TextBoxSociete.Clear(); // Vide le champs Societe TextBoxTelephone.Clear(); // Vide le champs Telephone TextBoxEmail.Clear(); // Vide le champs Email connection.Close(); // Fermeture de la connexion } }
private void Resetuj() { TextBoxId.Clear(); TextBoxIme.Clear(); TextBoxPrezime.Clear(); ListBox1.SelectedIndex = -1; }
private void Resetuj(bool rez) { TextBoxAutomobilId.Clear(); TextBoxTipId.Clear(); TextBoxTipGoriva.Clear(); TextBoxBrend.Clear(); TextBoxModel.Clear(); TextBoxGodProizvodnje.Clear(); TextBoxBoja.Clear(); TextBoxKapacitet.Clear(); TextBoxBrVrata.Clear(); TextBoxVrstaMenjaca.Clear(); TextBoxRezervacijaId.Clear(); DateDatumIznajmljivanja.SelectedDate = DateTime.Today; DateDatumVracanja.SelectedDate = DateDatumIznajmljivanja.SelectedDate.Value.AddDays(1); TextBoxCenaAuta.Clear(); TextBoxCenaRezervoara.Clear(); TextBoxUkupnaCena.Clear(); TextBoxOpis.Clear(); if (rez) { TextBoxImeKlijenta.Clear(); comboKlijenti.SelectedIndex = -1; TextBoxImePrezime.Clear(); TextBoxDatum_rodjenja.Clear(); TextBoxEmail.Clear(); TextBoxBroj_telefona.Clear(); TextBoxBr_vozacke_dozvole.Clear(); TextBoxId.Clear(); } }
private void Resetuj() { TextBoxId.Clear(); TextBoxIme.Clear(); TextBoxPrezime.Clear(); TextBoxEmail.Clear(); ComboBox1.SelectedIndex = -1; }
private void Resetuj() { TextBoxId.Clear(); ComboKategorija.SelectedIndex = -1; TextBoxNaziv.Clear(); TextBoxCijena.Clear(); TextBoxOpis.Clear(); }
private void ButtonRaz_OnClick(object sender, RoutedEventArgs e) { TextBoxId.Clear(); // Vide le champs ID TextBoxNom.Clear(); // Vide le champs Nom TextBoxPrenom.Clear(); // Vide le champs Prenom TextBoxSociete.Clear(); // Vide le champs Societe TextBoxTelephone.Clear(); // Vide le champs Telephone TextBoxEmail.Clear(); // Vide le champs Email }
private void Resetuj() { odabranaSlika = ""; TextBoxId.Clear(); TextBoxNaziv.Clear(); TextBoxOpis.Clear(); Image1.Source = null; DataGrid1.SelectedIndex = -1; }
private void Resetuj() { odabranaSlika = ""; Image1.Source = null; TextBoxId.Clear(); TextBoxIme.Clear(); TextBoxPrezime.Clear(); DataGrid1.SelectedIndex = -1; RadioMuski.IsChecked = true; }
private void resetuj()//metoda za resetovanje korisnickog interface-a { TextBoxId.Clear(); TextBoxIme.Clear(); TextBoxPrezime.Clear(); RadioMale.IsChecked = true; image1.Source = null; dataGrid1.SelectedIndex = -1; slikaIzvor = "";//ponistava se izvor slike sa kojom smoranije radili }
private void Resetuj() { TextBoxId.Clear(); TextBoxIme.Clear(); TextBoxPrezime.Clear(); ComboBox1.SelectedIndex = -1; RadioButtonMuski.IsChecked = false; RadioButtonZenski.IsChecked = false; ListBox1.SelectedIndex = -1; }
private void Resetuj() { TextBoxId.Clear(); TextBoxNaziv.Clear(); TextBoxOpis.Clear(); }