private void AddAdres_Click(object sender, EventArgs e) { CollectForm(); AdresatDW adresat = new AdresatDW(); adresat.Wiadomość = Wiadomość; AdresatForm form = new AdresatForm(adresat); form.ShowDialog(); dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = Wiadomość.AdresaciDW.ToList<AdresatDW>(); dataGridView1.Refresh(); }
private void AdresatCombo_DropDown(object sender, EventArgs e) { AdresatForm form = new AdresatForm(this.AdresatCombo); form.ShowDialog(); AdresatCombo.AllowDrop = false; this.Focus(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { var adresat = dataGridView1.Rows[e.RowIndex].DataBoundItem as AdresatDW; AdresatForm form = new AdresatForm(adresat); form.ShowDialog(); dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = Wiadomość.AdresaciDW.ToList(); dataGridView1.Refresh(); }