Example #1
0
        private void редактироватьToolStripMenuItem3_Click(object sender, EventArgs e)
        {
            NewToner toner = new NewToner(true, this.TonerDGW.CurrentRow.Cells[0].Value.ToString(), this.TonerDGW.CurrentRow.Cells[1].Value.ToString(), this.TonerDGW.CurrentRow.Cells[2].Value.ToString(), this.TonerDGW.CurrentRow.Cells[3].Value.ToString(), this.TonerDGW.CurrentRow.Cells[4].Value.ToString(), this.TonerDGW.CurrentRow.Cells[5].Value.ToString());

            if (toner.ShowDialog() == DialogResult.OK)
            {
                this.TonerDGW.DataSource = this.dal.GetToner(this.CatrijDGW.CurrentRow.Cells[0].Value.ToString());
                this.label5.Text         = "Отредактировано";
            }
        }
Example #2
0
        private void добавитьТонерToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewToner toner = new NewToner();

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