Exemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            editar ed = new editar(myads);

            ed.ShowDialog();
            comboBox1.Items.Clear();
            List <string> adtitles = new List <string>();

            foreach (adsense a in myads)
            {
                adtitles.Add(a.website[0]);
            }
            comboBox1.Items.AddRange(adtitles.ToArray());
        }
        private void BTNeditar_Click(object sender, RoutedEventArgs e)
        {
            DataRowView row     = (DataRowView)dataGridCxC.SelectedItems[0];
            editar      ventana = new editar();

            ventana.id_con        = row["cod_niif"].ToString();
            ventana.nom_con       = row["nom_con"].ToString();
            ventana.añoNota       = CB_year.SelectedValue.ToString();
            ventana.TX_nota.Text  = row["nota"].ToString();
            ventana.ShowInTaskbar = false;
            ventana.Owner         = Application.Current.MainWindow;
            ventana.ShowDialog();

            if (ventana.actualizo == true)
            {
                actualizarGrid(row, ventana);
            }
        }