protected override void btnCrear_Click(object sender, EventArgs e) { base.btnCrear_Click(sender, e); var crearForm = new CreateProvider(Loaddata); crearForm.MdiParent = _mdiParentForm; crearForm.Show(); }
protected override void btnActualizar_Click(object sender, EventArgs e) { base.btnActualizar_Click(sender, e); var selectedRow = dataGridView1.SelectedRows[0].Cells[0].Value; var proveedor = DbContext.Instance.Find <Proveedor>($"select * from Proveedor where Id={selectedRow}"); var contacto = DbContext.Instance.Find <ContactoProveedor>($"select top 1 * from ContactoProveedor where IdProveedor={proveedor.Id}"); var crearForm = new CreateProvider(Loaddata, proveedor, contacto); crearForm.MdiParent = _mdiParentForm; crearForm.Show(); }