Ejemplo n.º 1
0
        private void редактироватьToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            NewDetal detal = new NewDetal(true, this.DetalDGW.CurrentRow.Cells[0].Value.ToString(), this.DetalDGW.CurrentRow.Cells[1].Value.ToString(), this.DetalDGW.CurrentRow.Cells[2].Value.ToString(), this.DetalDGW.CurrentRow.Cells[3].Value.ToString(), this.DetalDGW.CurrentRow.Cells[4].Value.ToString(), this.DetalDGW.CurrentRow.Cells[5].Value.ToString());

            if (detal.ShowDialog() == DialogResult.OK)
            {
                this.DetalDGW.DataSource = this.dal.GetDetal(this.CatrijDGW.CurrentRow.Cells[0].Value.ToString());
                this.label5.Text         = "Отредактировано";
            }
        }
Ejemplo n.º 2
0
        private void добавитьДетальToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewDetal detal = new NewDetal();

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