Пример #1
0
        private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewPrinter printer = new NewPrinter(true, this.PrinterDGW.CurrentRow.Cells[0].Value.ToString(), this.PrinterDGW.CurrentRow.Cells[1].Value.ToString(), this.PrinterDGW.CurrentRow.Cells[2].Value.ToString(), this.PrinterDGW.CurrentRow.Cells[3].Value.ToString(), this.PrinterDGW.CurrentRow.Cells[4].Value.ToString(), this.PrinterDGW.CurrentRow.Cells[5].Value.ToString());

            if (printer.ShowDialog() == DialogResult.OK)
            {
                this.PrinterDGW.DataSource = this.dal.GetPrinter();
                this.label5.Text           = "Отредактировано";
            }
        }
Пример #2
0
        private void добавитьПринтерToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewPrinter printer = new NewPrinter();

            if (printer.ShowDialog() == DialogResult.OK)
            {
                MessageBox.Show("Принтер внесен в базу данных", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                this.PrinterDGW.DataSource = this.dal.GetPrinter();
            }
            else
            {
                MessageBox.Show("Принтер НЕ внесен в базу данных", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }