private void btnNuevo_Click(object sender, EventArgs e) { try { frmFa_Sucursal_Mant ofr = new frmFa_Sucursal_Mant(); ofr.event_frmFA_Sucursal_Mant_FormClosing += new frmFa_Sucursal_Mant.delegate_frmFA_Sucursal_Mant_FormClosing(ofr_event_frmFA_Sucursal_Mant_FormClosing); ofr.set_Accion(Cl_Enumeradores.eTipo_action.grabar); ofr.MdiParent = this.MdiParent; ofr.Show(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString()); } }
private void btnModificar_Click(object sender, EventArgs e) { try { frmFa_Sucursal_Mant ofr = new frmFa_Sucursal_Mant(); ofr.event_frmFA_Sucursal_Mant_FormClosing += new frmFa_Sucursal_Mant.delegate_frmFA_Sucursal_Mant_FormClosing(ofr_event_frmFA_Sucursal_Mant_FormClosing); ofr.set_Accion(Cl_Enumeradores.eTipo_action.actualizar); ofr.set_Sucursal(Sucursales.First(var => var.IdSucursal == Convert.ToInt32(lbxSucursales.SelectedValue))); ofr.MdiParent = this.MdiParent; ofr.Show(); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString()); } }