Ejemplo n.º 1
0
        private void Btn_imprimir_Click(object sender, EventArgs e)
        {
            List <AsientoDataSourceShow> asientosinact = new List <AsientoDataSourceShow>();

            if (this.ValidarCampos())
            {
                try
                {
                    asientosinact = this.negocioAsiento.CargarInformeSinActualizar(txt_anio.Text, int.Parse(cbx_mes.SelectedValue.ToString()), txt_compro.Text, txt_docin.Text, txt_docfin.Text, Program.compa);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("SE PRESENTO UN ERROR : " + ex.Message, "ERROR", MessageBoxButtons.OK);
                }
                Form_ReporteAsiento frm = new Form_ReporteAsiento(this, "sinact", asientosinact, dtt_fecha.Value.ToShortDateString(), check_encabe.Checked);
                frm.MdiParent = this.MdiParent;
                frm.Show();
                this.Deshabilitar();
            }
        }
Ejemplo n.º 2
0
        private void Btn_imprimir_Click(object sender, EventArgs e)
        {
            List <AsientoDataSourceShow> asientolibrodiario = new List <AsientoDataSourceShow>();
            string aniotrabajo = this.negocioParametro.AnioTrabajo();

            if (this.ValidarCampos())
            {
                if (this.tipodi == 1)
                {
                    try
                    {
                        asientolibrodiario = this.negocioAsiento.CargarInformeLibroDiario(int.Parse(cbx_mesdesde.SelectedValue.ToString()), int.Parse(cbx_meshasta.SelectedValue.ToString()), aniotrabajo, txt_compro.Text, txt_docin.Text, txt_docfin.Text, Program.compa);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("SE PRESENTO UN ERROR : " + ex.Message, "ERROR", MessageBoxButtons.OK);
                    }
                    Form_ReporteAsiento frm = new Form_ReporteAsiento(this, "librodiario", asientolibrodiario, dtt_fecha.Value.ToShortDateString(), check_encabe.Checked);
                    frm.MdiParent = this.MdiParent;
                    frm.Show();
                    this.DeshabilitarDetallado();
                }
                else
                {
                    try
                    {
                        asientolibrodiario = this.negocioAsiento.CargarInformeLibroResumido(int.Parse(cbx_resumido.SelectedValue.ToString()), aniotrabajo, Program.compa);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show("SE PRESENTO UN ERROR : " + ex.Message, "ERROR", MessageBoxButtons.OK);
                    }
                    Form_ReporteAsiento frm = new Form_ReporteAsiento(this, "libroresumido", asientolibrodiario, dtt_fecha.Value.ToShortDateString(), check_encabe.Checked);
                    frm.MdiParent = this.MdiParent;
                    frm.Show();
                    this.DeshabilitarResumido();
                }
            }
        }