コード例 #1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            SklepyDodawanieForm sklepyDodawanie = new SklepyDodawanieForm();

            sklepyDodawanie.ShowDialog();

            if (sklepyDodawanie.czyDodano)
            {
                ZaladujMailDataGridView();
            }
        }
コード例 #2
0
        private void changeButton_Click(object sender, EventArgs e)
        {
            if (mailDataGridView.CurrentCell != null)
            {
                String sklepID    = mailDataGridView.CurrentRow.Cells["SKL_SklId"].Value.ToString();
                String nazwa      = mailDataGridView.CurrentRow.Cells["SKL_Nazwa"].Value.ToString();
                String archiwalny = mailDataGridView.CurrentRow.Cells["SKL_Archiwalny"].Value.ToString();

                SklepyDodawanieForm sklepyDodawanie = new SklepyDodawanieForm(sklepID, nazwa, archiwalny);
                sklepyDodawanie.ShowDialog();

                if (sklepyDodawanie.czyDodano)
                {
                    ZaladujMailDataGridView();
                }
            }
            else
            {
                MessageBox.Show("Nie wybrano wiersza.", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }