Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var addedit = new AddEditFloor();

            addedit.ShowDialog();
            ini();
            isactive();
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (bgFloor.Rows.Count > 0)
            {
                try
                {
                    var addedit = new AddEditFloor(bgFloor.SelectedRows[0].Cells["cname"].Value.ToString(), bgFloor.SelectedRows[0].Cells["abbreviation"].Value.ToString(), bgFloor.SelectedRows[0].Cells["ID"].Value.ToString(), true);

                    addedit.ShowDialog();
                }
                catch (Exception r) { MessageBox.Show("Нет записей для редактирования." + "\n" + r.ToString(), "Ошибка"); }
            }
            ini();
            isactive();
        }