private void Clear() { TextBoxId.Clear(); TextBoxUserName.Clear(); TextBoxPassword.Clear(); ComboBoxAdmin.SelectedIndex = -1; }
private void Resetuj() { TextBoxId.Clear(); TextBoxIme.Clear(); TextBoxPrezime.Clear(); ListBox1.SelectedIndex = -1; }
//Resetuj private void Resetuj() { TextBoxId.Clear(); TextBoxNaziv.Clear(); TextBoxOpis.Clear(); Combo1.SelectedIndex = -1; }
private void Resetuj() { TextBoxId.ClearValue(TextBox.TextProperty); TextBoxIme.ClearValue(TextBox.TextProperty); TextBoxPrezime.ClearValue(TextBox.TextProperty); GridView1.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(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(); } }
protected void ButtonBuscar_Click(object sender, EventArgs e) { Mensajes mensaje = new Mensajes(); int id = int.Parse(TextBoxId.Text); try { CargarDatos(mensaje); if (!String.IsNullOrWhiteSpace(TextBoxId.Text)) { if (mensaje.Buscar(id)) { DevolverDatos(mensaje); TextBoxId.Focus(); } else { Response.Write("<Script> alert('" + TextBoxId.Text + " No Existe!')</Script>"); } } } catch (Exception ex) { Response.Write("<Script> alert('" + ex.Message + "')</Script>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Mensajes mensaje = new Mensajes(); if (Request.QueryString["Id"] != null) { string id = Request.QueryString["Id"].ToString(); if (mensaje.Buscar(int.Parse(id))) { DevolverDatos(mensaje); TextBoxId.Focus(); } else { Response.Write("<Script> alert('" + TextBoxId.Text + " No Existe!')</Script>"); } } if (Request.Cookies["mail"] == null) { Label3.Text = "No existe la cookie Email"; } else { Label3.Text = this.Request.Cookies["mail"].Value; Label1.Text = this.Session["nombre"].ToString(); Label2.Text = this.Session["apellido"].ToString(); } } }
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(); }