public static FrmPlanillaDetalleBoleta Instance(int anho, int mes, string codigoEmpleado) { if (frmInstance == null || frmInstance.IsDisposed == true) { frmInstance = new FrmPlanillaDetalleBoleta(anho, mes, codigoEmpleado); } frmInstance.BringToFront(); return(frmInstance); }
private void btnBoleta_Click(object sender, EventArgs e) { try { if (this.dgvPlanilla.CurrentRow != null) { var uiPlanillaDetalle = (BE.UI.PlanillaDetalle) this.dgvPlanilla.CurrentRow.DataBoundItem; string codigoEmpleado = uiPlanillaDetalle.EmpleadoCodigo; var frmBoleta = FrmPlanillaDetalleBoleta.Instance(this.anho, this.mes, codigoEmpleado); frmBoleta.MdiParent = this.MdiParent; frmBoleta.Show(); } } catch (Exception ex) { Util.ErrorMessage(ex.Message); } }