Exemplo n.º 1
0
        protected override void btnAdd_Click(object sender, EventArgs e)
        {
            FrmCategoryEdit frm = new FrmCategoryEdit();

            frm.ShowDialog();
            refresh();
        }
Exemplo n.º 2
0
        protected override void button2_Click(object sender, EventArgs e)
        {
            Categories cat = (Categories)dataGridView1.SelectedRows[0].DataBoundItem;

            FrmCategoryEdit frm = new FrmCategoryEdit(cat);

            frm.ShowDialog();
            refresh();
        }
Exemplo n.º 3
0
        protected override void btnEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count <= 0)
            {
                MessageBox.Show("select row to Update");
                return;
            }
            Categories      ctg = (Categories)dataGridView1.SelectedRows[0].DataBoundItem;
            FrmCategoryEdit frm = new FrmCategoryEdit(ctg);

            frm.ShowDialog();
            refresh();
        }
Exemplo n.º 4
0
        protected override void button2_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count <= 0)
            {
                MessageBox.Show("Select row");
                return;
            }

            Categories      entity = (Categories)dataGridView1.SelectedRows[0].DataBoundItem;
            FrmCategoryEdit frm    = new FrmCategoryEdit(entity);

            frm.ShowDialog();
            refresh();
        }