Exemplo n.º 1
0
        private void редактироватьToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            NewShop shop = new NewShop(true, this.ShopDGW.CurrentRow.Cells[0].Value.ToString(), this.ShopDGW.CurrentRow.Cells[1].Value.ToString(), this.ShopDGW.CurrentRow.Cells[2].Value.ToString(), this.ShopDGW.CurrentRow.Cells[3].Value.ToString(), this.ShopDGW.CurrentRow.Cells[4].Value.ToString(), this.ShopDGW.CurrentRow.Cells[5].Value.ToString(), this.ShopDGW.CurrentRow.Cells[6].Value.ToString());

            if (shop.ShowDialog() == DialogResult.OK)
            {
                this.ShopDGW.DataSource = this.dal.GetShop(this.TonerDGW.CurrentRow.Cells[0].Value.ToString());
                this.label5.Text        = "Отредактировано";
            }
        }
Exemplo n.º 2
0
        private void добавитьПокупкуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewShop shop = new NewShop();

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