Beispiel #1
0
 private void btnImprimir_Click(object sender, EventArgs e)
 {
     try
     {
         BL.ClsReportes ClsReportes = new BL.ClsReportes();
         DataTable      dt          = new DataTable();
         FrmReporte     frm         = new FrmReporte();
         dt = ClsReportes.rptRecibos();
         frm.cargarReporte("RptRecibo", dt);
     }
     catch (Exception ex)
     {
         ClsHelper.erroLog(ex);
     }
 }
Beispiel #2
0
 void mostrarEstadoCuenta()
 {
     try
     {
         BL.ClsReportes ClsReportes = new BL.ClsReportes();
         DataSet        dts         = new DataSet();
         FrmReporte     FrmReporte  = new FrmReporte();
         dts = ClsReportes.rptEstadoCuenta(grdVenta.SelectedRows[0].Cells["idVentaCol"].Value.ToString());
         FrmReporte.cargarReporte("RptEstadoCuenta", dts);
     }
     catch (Exception)
     {
         throw;
     }
 }
 private void verEstadoDeCuentaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         BL.ClsReportes ClsReportes = new BL.ClsReportes();
         DataSet        dts         = new DataSet();
         FrmReporte     FrmReporte  = new FrmReporte();
         dts = ClsReportes.rptEstadoCuenta(grdDatos.SelectedRows[0].Cells["idVentaCol"].Value.ToString());
         FrmReporte.cargarReporte("RptEstadoCuenta", dts);
     }
     catch (Exception ex)
     {
         ClsHelper.erroLog(ex);
     }
 }
 private void FrmRptCientesAtrasados_Load(object sender, EventArgs e)
 {
     BL.ClsReportes ClsReportes = new BL.ClsReportes();
     try
     {
         this.Cursor         = Cursors.WaitCursor;
         dtResult            = ClsReportes.clientesMorosos();
         grdDatos.DataSource = dtResult;
     }
     catch (Exception ex)
     {
         ClsHelper.erroLog(ex);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Beispiel #5
0
 private void btnImprimir_Click(object sender, EventArgs e)
 {
     try
     {
         BL.ClsReportes clsReporte = new BL.ClsReportes();
         DataTable      dt         = new DataTable();
         FrmReporte     frmrep     = new FrmReporte();
         dt = clsReporte.rptVenta(idVenta);
         frmrep.cargarReporte("RptVenta", dt);
         DialogResult r = MessageBox.Show("¿Proceso finalizado, desea salir?", "Confirmar", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (r == DialogResult.Yes)
         {
             this.Dispose();
             this.Close();
         }
     }
     catch (Exception ex)
     {
         ClsHelper.erroLog(ex);
     }
 }
Beispiel #6
0
        private void mostrarAlerta()
        {
            try
            {
                //Espera 1 minuto

                BL.ClsReportes ClsReportes = new BL.ClsReportes();
                DataTable      dtMorosos   = new DataTable();
                dtMorosos = ClsReportes.clientesMorosos();
                if (dtMorosos.Rows.Count > 0)
                {
                    // Create a regular custom button.
                    //AlertButton btn1 = new AlertButton(/*Image.FromFile(@"c:\folder-16x16.png")*/);
                    //btn1.Hint = "Ver Listado";
                    //btn1.Name = "btnListado";
                    //// Create a check custom button.
                    //AlertButton btn2 = new AlertButton(Image.FromFile(@"c:\clock-16x16.png"));
                    //btn2.Style = AlertButtonStyle.CheckButton;
                    //btn2.Down = true;
                    //btn2.Hint = "Alert On";
                    //btn2.Name = "buttonAlert";
                    // Add buttons to the AlertControl and subscribe to the events to process button clicks
                    //alertControl1.Buttons.Add(btn1);
                    //alertControl1.Buttons.Add(btn2);
                    alertControl1.ButtonClick += new AlertButtonClickEventHandler(btnListado_Click);
                    //alertControl1.ButtonDownChanged +=
                    //    new AlertButtonDownChangedEventHandler(alertControl1_ButtonDownChanged);

                    // Show a sample alert window.
                    AlertInfo info = new AlertInfo("Clientes con pagos Atrasados", "¡Se han encontrado algunos clientes que tienen cuotas atrasadas!");
                    alertControl1.AutoFormDelay = 60000;

                    alertControl1.Show(this, info);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #7
0
        private void buscar()
        {
            try
            {
                BL.ClsReportes clsReporteVenta = new BL.ClsReportes();
                string         forma           = "";
                if (cmbTipoVenta.SelectedIndex > 0)
                {
                    forma = cmbTipoVenta.SelectedItem.ToString();
                }
                //MessageBox.Show("c: " + forma);
                dtResult            = clsReporteVenta.ventasPorFecha(picFechaInicio.Value.ToShortDateString(), picFechaFin.Value.ToShortDateString(), forma);
                grdDatos.DataSource = dtResult;
                lblExistentes.Text  = grdDatos.Rows.Count.ToString() + " Registro(s)";

                CalcularTotales();
            }
            catch (Exception)
            {
                throw;
            }
        }
        private void btnGenerarCotizacion_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtCliente.Text != "")
                {
                    if (txtSucursal.Text != "")
                    {
                        if (txtTelefono.Text != "")
                        {
                            if (txtVelidez.Text != "")
                            {
                                int i = 0;
                                if (int.TryParse(txtVelidez.Text, out i))
                                {
                                    string ct = "Contado";
                                    if (tipoCotizacion == "0")
                                    {
                                        ct = "Contado";
                                    }
                                    else if (tipoCotizacion == "1")
                                    {
                                        ct = "Financiamiento";
                                    }
                                    //ClsHelper.MensajeSistema("cuotas: " +cuotas);
                                    BL.ClsCotizacion clsCotizacion = new BL.ClsCotizacion();

                                    DataTable dt = clsCotizacion.agregar(idVehiculo, txtCliente.Text, enganche, cuotas, cuotaMensual, precioNegociado, txtSucursal.Text,
                                                                         txtTelefono.Text, ct, total, txtVelidez.Text.Trim());


                                    BL.ClsReportes clsReporte = new BL.ClsReportes();

                                    if (dt.Rows.Count == 1)
                                    {
                                        DataTable  dtt = clsReporte.reporteCotizacion(dt.Rows[0]["numeroCotizacion"].ToString());
                                        FrmReporte rpt = new FrmReporte();
                                        rpt.cargarReporte("RptCotizacion", dtt);
                                    }
                                    else
                                    {
                                        ClsHelper.MensajeSistema("no hgay cotizacion");
                                    }
                                    deshabilitarControles(false);

                                    /*DataTable dt = clsReporte.rptCotizacionVehiculo(
                                     *  idVehiculo,
                                     *  txtCliente.Text,
                                     *  enganche,
                                     *  cuotas,
                                     *  cuotaMensual,
                                     *  txtSucursal.Text,
                                     *  txtTelefono.Text,
                                     *  ct,
                                     *  total,
                                     *  precioNegociado);*/
                                }
                                else
                                {
                                    ClsHelper.MensajeSistema("Validez debe ser un numero...");
                                }
                            }
                            else
                            {
                                ClsHelper.MensajeSistema("Debe ingresar dias de validez...");
                            }
                        }
                        else
                        {
                            ClsHelper.MensajeSistema("Debe ingresar telefono de contacto...");
                        }
                    }
                    else
                    {
                        ClsHelper.MensajeSistema("Debe ingresar direccion de la sucursal...");
                    }
                }
                else
                {
                    ClsHelper.MensajeSistema("Debe ingresar nombre de cliente...");
                }
            }
            catch (Exception ex)
            {
                ClsHelper.erroLog(ex);
            }
        }