Ejemplo n.º 1
0
        //protected override void refresh()
        //{

        //    dataGridView1.DataSource = rep.List();
        //}

        protected override void btnAdd_Click(object sender, EventArgs e)
        {
            FrmUserEdit frm = new FrmUserEdit();

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

            frm.ShowDialog();
            refresh();
        }