Ejemplo n.º 1
0
 private void b_dodaj_Click(object sender, EventArgs e)
 {
     if (t_lista_uczestnikow.Rows.Count >= 25)
     {
         MessageBox.Show("Ilość uczetników osiągnęła masymalną wartość równą 25", "Pełne spotkanie",
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         this.Hide();
         Dodaj form = new Dodaj(connection, id_spotkania, 1);
         form.ShowDialog();
         this.Close();
     }
 }
Ejemplo n.º 2
0
        private void b_dodaj_uczestnika_Click(object sender, EventArgs e)
        {
            int id_rows = t_tablica.CurrentCell.RowIndex;

            if (Convert.ToInt32(t_tablica.Rows[id_rows].Cells[4].Value) >= 25)
            {
                MessageBox.Show("Ilość uczetników osiągnęła masymalną wartość równą 25", "Pełne spotkanie",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                int id = Convert.ToInt32(t_tablica.Rows[id_rows].Cells[0].Value);
                this.Hide();
                Dodaj form = new Dodaj(connection, id, 0);
                form.ShowDialog();
                this.Close();
            }
        }