Example #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;
        }
Example #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;
        }
Example #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()}";
        }
        public void Inicializado(int idCliente)
        {
            devolucionDA = new DevolucionDA();
            //laptop = new LC();
            detalles     = new BindingList <DevolucionDetalle>();
            tablaLaptops = devolucionDA.ListarLaptopsClientesEstadoAlquiladoConCorteAlquiler(idCliente);

            tablaLaptops.Columns.Add("Seleccionar", typeof(bool));
            tablaLaptops.Columns.Add("Observacion", typeof(string));
            tablaLaptops.Columns.Add("PagaraCliente", typeof(int));
            tablaLaptops.Columns.Add("EquipoDanado", typeof(int));
            for (int h = 0; h < tablaLaptops.Rows.Count; h++)
            {
                tablaLaptops.Rows[h]["Seleccionar"]   = false;
                tablaLaptops.Rows[h]["Observacion"]   = "";
                tablaLaptops.Rows[h]["PagaraCliente"] = 0;
                tablaLaptops.Rows[h]["EquipoDanado"]  = 0;
            }

            dgvEquipos.DataSource = tablaLaptops;
            vistaEquipos.OptionsBehavior.AutoPopulateColumns = false;
            vistaEquipos.OptionsSelection.MultiSelect        = true;
        }
        private void inicializarFiltros(int idUsuario)
        {
            devolucionDA = new DevolucionDA();
            clienteDA    = new ClienteDA();

            dtpFecProceso.Value = DateTime.Now;

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

            tablaKam             = clienteDA.ListarKams();
            cmbKam.DataSource    = tablaKam;
            cmbKam.DisplayMember = "nombre";
            cmbKam.ValueMember   = "idUsuario";
            cmbKam.SelectedIndex = 0;

            tablaEstados            = devolucionDA.ListarEstados();
            cmbEstado.DataSource    = tablaEstados;
            cmbEstado.DisplayMember = "nombreEstado";
            cmbEstado.ValueMember   = "idEstado";
            cmbEstado.SelectedIndex = 0;

            if (rbtnNumAlquiler.Checked)
            {
                txtNumAlquiler.Enabled = true;
            }
            else
            {
                txtNumAlquiler.Enabled = false;
            }
            if (chbEstado.Checked)
            {
                cmbEstado.Enabled = true;
            }
            else
            {
                cmbEstado.Enabled = false;
            }
            if (chbKam.Checked)
            {
                cmbKam.Enabled = true;
            }
            else
            {
                cmbKam.Enabled = false;
            }
            if (chbCliente.Checked)
            {
                cmbCliente.Enabled = true;
            }
            else
            {
                cmbCliente.Enabled = false;
            }
            if (chbFecProceso.Checked)
            {
                dtpFecProceso.Enabled = true;
            }
            else
            {
                dtpFecProceso.Enabled = false;
            }
            dgvDevolucion.PrimaryGrid.AutoGenerateColumns = false;
        }