private void btnImprimir_Click(object sender, EventArgs e) { try { if (this.uiPlanillaBoleta == null) { return; } bool rpta = false; rpta = Util.ConfirmationMessage($"¿Desea generar la boleta del empleado '{ this.txtEmpleadoNombres.Text }'?"); if (rpta == false) { return; } //Guardar rpta = new LN.PlanillaBoleta().Registrar(ref this.uiPlanillaBoleta); if (rpta == false) { return; } //Mostrar var frmPlanillaVista = new FrmImpresion(); frmPlanillaVista.MdiParent = this.MdiParent; frmPlanillaVista.Show(); frmPlanillaVista.ImpresionBoleta(this.uiPlanillaBoleta.Anho, this.uiPlanillaBoleta.Mes, this.uiPlanillaBoleta.EmpleadoCodigo); } catch (Exception ex) { Util.ErrorMessage(ex.Message); } }
private void btnImprimir_Click(object sender, EventArgs e) { try { int anho = int.Parse(this.cboAnho.SelectedValue.ToString()); int mes = int.Parse(this.cboMes.SelectedValue.ToString()); string codigoTrabajador = this.cboEmpleado.SelectedValue.ToString(); var frmPlanillaVista = new FrmImpresion(); frmPlanillaVista.MdiParent = this.MdiParent; frmPlanillaVista.Show(); frmPlanillaVista.ImpresionRecibo(anho, mes, codigoTrabajador); } catch (Exception ex) { Util.ErrorMessage(ex.Message); } }