Пример #1
0
        public void Inicializado()
        {
            clienteDA    = new ClienteDA();
            alquilerDA   = new AlquilerDA();
            devolucionDA = new DevolucionDA();
            devolucion   = new Devolucion();

            detalleTemp           = new DevolucionDetalle();
            dtpFechaIngreso.Value = DateTime.Now;

            tablaCliente             = clienteDA.ListarClientes();
            cmbCliente.DataSource    = tablaCliente;
            cmbCliente.DisplayMember = "nombre_razonSocial";
            cmbCliente.ValueMember   = "idCliente";

            cmbCliente.SelectedIndex = 0;

            int i = cmbCliente.SelectedIndex;

            int idCliente = Convert.ToInt32(tablaCliente.Rows[i]["idCliente"].ToString());

            txtNroDocumento.Text = tablaCliente.Rows[i]["nroDocumento"].ToString();

            tablaLaptops = devolucionDA.ListarLaptopsClientesEstadoAlquilado(idCliente);

            ObtenerDatosDevolucion();
            devolucion.LlenarDatos(tablaLaptops);
            dgvLaptopsSeleccionados.PrimaryGrid.DataSource          = tablaLaptops;
            dgvLaptopsSeleccionados.PrimaryGrid.AutoGenerateColumns = false;
        }
Пример #2
0
        public void Inicializado(int idCliente)
        {
            devolucionDA = new DevolucionDA();
            //laptop = new LC();
            detalles     = new BindingList <DevolucionDetalle>();
            tablaLaptops = devolucionDA.ListarLaptopsClientesEstadoAlquilado(idCliente);

            dgvLaptops.PrimaryGrid.DataSource          = tablaLaptops;
            dgvLaptops.PrimaryGrid.AutoGenerateColumns = false;
        }
Пример #3
0
        public void Inicializado()
        {
            clienteDA    = new ClienteDA();
            alquilerDA   = new AlquilerDA();
            devolucionDA = new DevolucionDA();
            devolucion   = new Devolucion();

            ingresoDA = new IngresoDA();
            ingreso   = new Ingreso();

            detalleTemp           = new DevolucionDetalle();
            dtpFechaIngreso.Value = DateTime.Now;

            tablaCliente             = clienteDA.ListarClientes();
            cmbCliente.DataSource    = tablaCliente;
            cmbCliente.DisplayMember = "nombre_razonSocial";
            cmbCliente.ValueMember   = "idCliente";

            cmbCliente.SelectedIndex = 0;

            int i = cmbCliente.SelectedIndex;

            int idCliente = Convert.ToInt32(tablaCliente.Rows[i]["idCliente"].ToString());

            txtNroDocumento.Text = tablaCliente.Rows[i]["nroDocumento"].ToString();

            tablaLaptops = devolucionDA.ListarLaptopsClientesEstadoAlquilado(idCliente);

            //===============================================
            tablaSede             = ingresoDA.ListarSede();
            cmbSede.DataSource    = tablaSede;
            cmbSede.DisplayMember = "nombreSede";
            cmbSede.ValueMember   = "idSede";
            cmbSede.SelectedIndex = -1;
            //===============================================

            ObtenerDatosDevolucion();
            devolucion.LlenarDatos(tablaLaptops);
            dgvLaptopsSeleccionados.DataSource = tablaLaptops;
            vistaEquipos.OptionsBehavior.AutoPopulateColumns = false;
            vistaEquipos.OptionsSelection.MultiSelect        = true;

            lblContador.Text = $"CANTIDAD REGISTRO: {devolucion.Detalles.Count.ToString()}";
        }