Exemple #1
0
        protected override void btnAdd_Click(object sender, EventArgs e)
        {
            FrmProductEdit frm = new FrmProductEdit();

            frm.ShowDialog();
            refresh();
        }
Exemple #2
0
        protected override void btnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                MessageBox.Show("Select row to edit");
                return;
            }
            Products       entity = (Products)dataGridView1.SelectedRows[0].DataBoundItem;
            FrmProductEdit frm    = new FrmProductEdit(entity);

            frm.ShowDialog();
            refresh();
        }