示例#1
0
        private void BTNgenerar_Click(object sender, EventArgs e)
        {
            if (this.ValidarCamposMandatorios())
            {
                Dictionary <String, String> parametrosDeFacturacion = new Dictionary <string, string>();

                //obtenemos el id de los datos de los combos, ya que provienen de otras tablas
                idCliente   = getIdClienteSeleccionado(); //el idCliente lo dejamos fijo al momento de generar la factura entonces, si despues se cambia. Al momento de cargar la factura se toma con el que se genero
                fechaInicio = Convert.ToDateTime(DTEinicio.Text);
                fechaFin    = Convert.ToDateTime(DTEfin.Text);

                parametrosDeFacturacion.Add("id_cliente", idCliente.ToString());

                parametrosDeFacturacion.Add("entreFechas", fechaInicio + "&" + fechaFin); //"01/06/2017&30/06/2017"); el viaje sabe solo como buscar esto

                facturacion = Facturacion.facturarIntervalo(parametrosDeFacturacion);

                txtImporteTotal.Text = facturacion.ImporteTotal.ToString();

                mostrarViajes();
            }
            else
            {
                this.MensajeError();
            };
        }
示例#2
0
 private void Facturacion_Click(object sender, EventArgs e)
 {
     Facturacion.Facturacion facturacion = new Facturacion.Facturacion(this);
     visibilidad = false;
     this.Hide();
     facturacion.Show();
 }
示例#3
0
 public HistorialFacturado(DataGridViewRow fila, Facturacion fact) //constructor llamado por el click en el boton del datagrid
 {
     InitializeComponent();
     bd               = new BaseDeDatos();
     conexion         = bd.getCon();
     this.facturacion = fact;
     cliente_Username = fila.Cells[0].Value.ToString();
 }
示例#4
0
        //metodos de instancia
        public void guardate()
        {
            Facturacion facturacionStored = repositorioFacturacion.Guardar(this);

            this.viajes.ForEach(viaje =>
            {
                viaje.setIdFactura(facturacionStored.Id.ToString());
                viaje.modificate();
            });
        }
        private void busquedaDeValores()
        {
            Dictionary <String, String> parametrosDeBusqueda = new Dictionary <string, string>();

            if (TXTdni.Text != "")
            {
                parametrosDeBusqueda.Add("id_cliente", TXTdni.Text);
            }
            List <Facturacion> viajes = Facturacion.buscar(parametrosDeBusqueda);

            construccionDeGridView(viajes);
        }