Beispiel #1
0
        private void CargaTablas()
        {
            string sCad;
            int[] aCols = {30,30,150,150,200,150,75, 150, 150 };
            Clases.cDatos oDat = new Clases.cDatos();

            //  Tabla de Solicitudes
            sCad = "SELECT solicitudnum AS solicitud, fecha, categoria as equipo, tipoequipo,  ubica,  tecnico, telefono, " +
                "  nombres || '  ' || apellidos AS entrega,   nombresrecibe || '  ' ||  apellidosrecibe AS recibe, " +
                "  fechaprobable, cedulaentrega, cedularecibe, fechaprobable, " +
                " serie, seriecse, idtipoequipo, idubica, telefono, motivo, idsolicitud, cargo,  cargorecibe, referencia " +
                " FROM imagenes.Solicitud3vw ORDER BY solicitudnum";

               dtSol = oDat.LlenaTabla(sCad);
               grSolicitudes.DataSource = dtSol;
               oDat = null;

            //Configura el Grid
               for (int i = 0; i < dtSol.Rows.Count; i++)
               {
               if (i < aCols.Length)
                    gridView1.Columns[i].Width = aCols[i];
               else
                    gridView1.Columns[i].Visible = false;
               }
        }
        private void fTipoComponente_Load(object sender, EventArgs e)
        {
            String sCad = "SELECT * FROM imagenes.catcomponentes ORDER BY componente ";
            // Llena el dtatable
            Clases.cDatos oDat = new Clases.cDatos();
            dtComponentes = oDat.LlenaTabla(sCad);

            oDat = null;
        }
Beispiel #3
0
        private void llenaDataTables()
        {
            Clases.cDatos oDat = new Clases.cDatos();
            //  tabla equipos
            string sCad = "SELECT categoria, tipoequipo, serie, seriecse, ubica, marca, modelo, color, idequipo, idtipoequipo, idubica, " +
                    " idmarca, idmodelo, idcategoria, bpartes "  +
                    " FROM imagenes.equiposvw WHERE bpartes = true;  ";

            dtEquipos = oDat.LlenaTabla(sCad);

            //  tabla Componentes
            sCad = "SELECT * FROM imagenes.componentes ORDER BY idequipo ";
            dtComponentes = oDat.LlenaTabla(sCad);

            //  tabla Catalogo de Componentes:
            sCad = "SELECT componente, magnitud,  idcomponente, brepite, idmagnitud FROM  imagenes.catcomponentes ORDER BY componente ";
            dtCatComponentes = oDat.LlenaTabla(sCad);

            //  Tabla catalogo tipo de componnetes
            sCad = "SELECT * FROM  imagenes.cattipocomponentes ORDER BY idcomponente  ";
            dtTipoComponentes = oDat.LlenaTabla(sCad);

            //  Tabla de Marcas
            sCad = "SELECT * FROM imagenes.catmarcas ORDER BY marca";
            dtMarcas = oDat.LlenaTabla(sCad);

            //  Tabla de Magnitudes
            sCad = "SELECT * FROM imagenes.catmagnitudes ORDER BY magnitud";
            dtMagnitudes = oDat.LlenaTabla(sCad);

            //  Tabla de Medidas
            sCad = "SELECT * FROM imagenes.catmedidas ORDER BY medida";
            dtMedidas = oDat.LlenaTabla(sCad);

            oDat = null;
        }
Beispiel #4
0
        //   Selecciona e imprime una solicitud permitirendo modificar, imprimir una solicitud previamente grabada.
        public void selImprimirSolicitud()
        {
            DataTable dtSol = new DataTable();
            DataRow fila;
            int[] aColumns = { 100, 100, 150, 150, 150, 100, 100, 150 };
            string titulo = "Seleccion de Solicitudes de ST";

            String sCad = "SELECT solicitudnum , fecha, categoria, marca, modelo, tipoequipo,  ubica,  serie, seriecse, tecnico, " +
                " cedulaentrega, cedularecibe, telefono, idequipo, idtipoequipo, idubica,  motivo, idsolicitud,  " +
                " nombres, apellidos, cargo,  nombresrecibe, apellidosrecibe, cargorecibe,  referencia, color " +
                " FROM imagenes.Solicitud3vw ORDER BY solicitudnum";

            Clases.cDatos oDat = new Clases.cDatos();
            dtSol = oDat.LlenaTabla(sCad);
            DataTable dt = dtSol.Clone();

            Clases.cCatalogo oCat = new SOPORTEC.Clases.cCatalogo(dtSol, titulo, "solicitudesST", aColumns, false);
            fila = oCat.retornaFila();

            if (fila == null)
            {
                MessageBox.Show("SELECCIONE UNA SOLICITUD DE ST CON UN DOBLE CLICK DEL MOUSE ");
                return;
            }
            else
            {
              //  fila["nombres"] = fila["nombres"].ToString() + "  " + fila["apellidos"].ToString();
              //  fila["nombresrecibe"] = fila["nombresrecibe"].ToString() + "  " + fila["apellidosrecibe"].ToString();
                fila["tipoequipo"] = fila["categoria"].ToString()  + "  " + fila["tipoequipo"].ToString() ;
                fila["nombres"] = fila["nombres"].ToString() + "  " + fila["apellidos"].ToString();
                fila["nombresrecibe"] = fila["nombresrecibe"].ToString() + "  " + fila["apellidosrecibe"].ToString();
                dt.ImportRow(fila);
                dtSol = null;

                cReportes oRep = new cReportes();
                oRep.CreafReportes("Solicitud", "", "Titulo 1", dt);

                oRep = null;
                dt = null;
            }
        }
Beispiel #5
0
 private void fPersona_Load(object sender, EventArgs e)
 {
     String sCad = "SELECT * FROM imagenes.catubica ORDER BY ubica";
     Clases.cDatos oDat = new Clases.cDatos();
     dtUbica = oDat.LlenaTabla(sCad);
     oDat = null;
 }
Beispiel #6
0
        private void llenaDataTables()
        {
            int idEstado = 0;
            String scad = "";
            Clases.cDatos oDat = new Clases.cDatos();

            if (sfiltro == "I")
            {
                scad = "SELECT categoria, tipoequipo, serie, seriecse, ubica, marca, modelo, color, bpartes, idequipo, idtipoequipo, " +
                " idubica, idmarca, idmodelo, idcategoria " +
                    " FROM imagenes.equiposvw ;  ";

            }
            else if (sfiltro == "M")
            {
                scad = "SELECT categoria, tipoequipo, serie, seriecse, ubica, marca, modelo, color, bpartes, estado, idequipo, idtipoequipo, " +
                " idubica, idmarca, idmodelo, idcategoria, idestado " +
                    " FROM imagenes.eqMntto1vw ;  ";

                lblFiltro.Text = "EQUIPOS EN MANTENIMIENTO TECNICO";

            }

            dtInventarios = oDat.LlenaTabla(scad);
            oDat = null;

            if (sfiltro == "M")
            {
                idEstado = int.Parse(dtInventarios.Rows[0]["idestado"].ToString());
                if (idEstado < 3)
                {
                    cmdEstado.Text = "Asignar Tecnico";
                }
                else if (idEstado >= 3 && idEstado < 6  )
                {
                    cmdEstado.Text = "Registrar Diagnostico";
                }
                else if (idEstado >= 6 && idEstado < 8)
                {
                    cmdEstado.Text = "Acta de Entrega";
                }
                else if (idEstado == 9)
                {
                    cmdEstado.Text = "Soporte de Baja";
                }

            }
        }