예제 #1
0
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewLocale locale = new NewLocale(true, this.LocaleDGW.CurrentRow.Cells[0].Value.ToString(), this.LocaleDGW.CurrentRow.Cells[1].Value.ToString(), this.LocaleDGW.CurrentRow.Cells[2].Value.ToString(), this.LocaleDGW.CurrentRow.Cells[3].Value.ToString(), this.LocaleDGW.CurrentRow.Cells[4].Value.ToString());

            if (locale.ShowDialog() == DialogResult.OK)
            {
                this.LocaleDGW.DataSource = this.dal.GetLocale(this.PrinterDGW.CurrentRow.Cells[0].Value.ToString());
                this.label5.Text          = "Отредактировано";
            }
        }
예제 #2
0
        private void добавитьЛокациюToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewLocale locale = new NewLocale();

            if (locale.ShowDialog() == DialogResult.OK)
            {
                MessageBox.Show("Новое расположение внесено в базу данных", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                this.LocaleDGW.DataSource = this.dal.GetLocale(this.PrinterDGW.CurrentRow.Cells["ID"].Value.ToString());
            }
            else
            {
                MessageBox.Show("Новое расположение НЕ внесено в базу данных", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }