예제 #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            //Generar Cartas
            try
            {
                try
                {
                    DataSet    ds         = new DataSet();
                    CobranzaBE CobranzaBE = new CobranzaBE()
                    {
                        OPCION     = 10,
                        USUARIO    = General.General.GetUsuario,
                        dtRegistro = dtFechaFilter.Value
                    };

                    CobranzaBL CobranzaBL = new CobranzaBL();
                    ds = CobranzaBL.ProcesarCobranza(CobranzaBE);

                    Crystal.crRptCargoDocum          ocrLoteLiquidacion       = new Crystal.crRptCargoDocum();
                    Reportes.frmVisorLoteLiquidacion ofrmVisorLoteLiquidacion = new Reportes.frmVisorLoteLiquidacion();
                    ofrmVisorLoteLiquidacion.crvVisorLoteLiq.ReportSource = ocrLoteLiquidacion;
                    ocrLoteLiquidacion.SetDataSource(ds.Tables[0]);
                    ocrLoteLiquidacion.SetParameterValue("usuario", General.General.GetUsuario);
                    ofrmVisorLoteLiquidacion.ShowDialog();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet    ds         = new DataSet();
                CobranzaBE CobranzaBE = new CobranzaBE()
                {
                    OPCION     = 9,
                    USUARIO    = General.General.GetUsuario,
                    dtRegistro = dtFechaFilter.Value
                };

                CobranzaBL CobranzaBL = new CobranzaBL();
                ds = CobranzaBL.ProcesarCobranza(CobranzaBE);
                dgvEnvioCargo.DataSource = ds.Tables[0];
                lblRegistros.Text        = ds.Tables[0].Rows.Count.ToString() + " registro(s)";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }