Пример #1
0
        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();
        }
Пример #2
0
 private void AdresatCombo_DropDown(object sender, EventArgs e)
 {
     AdresatForm form = new AdresatForm(this.AdresatCombo);
     form.ShowDialog();
     AdresatCombo.AllowDrop = false;
     this.Focus();
 }
Пример #3
0
 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();
 }