Пример #1
0
 private void cmdubica_Click(object sender, EventArgs e)
 {
     int[] aCols = { 100, 250 };
     string cat = "imagenes.catubica";
     DataRow sRow;
     Clases.cCatalogo oCat = new cCatalogo(dtUbica, "Catalogo de Ubicaciones",cat , aCols, true);
     sRow = oCat.retornaFila();
     oCat = null;
     if (!(sRow == null))
     {
         oSol.idubica =int.Parse( sRow["idubica"].ToString());
         oSol.ubica = sRow["ubica"].ToString();
         oSol.tipoequipo = "";
         oSol.idtipoequipo = -1;
         this.txtubica.Text = oSol.ubica;
         this.txtTipoEq.Text = "";
     }
 }
Пример #2
0
 private void cmdTecnico_Click(object sender, EventArgs e)
 {
     //  selecciona el tecnico asignado
     int[] aCols = { 100, 200, 200, 200 };
     DataRow sRow;
     Clases.cCatalogo oCat = new cCatalogo(dtTecnicos, "Catalogo de Tecnicos", "imagenes.tecnicos", aCols, true);
     sRow = oCat.retornaFila();
     oCat = null;
     if (!(sRow == null))
     {
         oSol.cedulatecnico = sRow["cedula"].ToString();
         oSol.idtecnico = int.Parse(sRow["idtecnico"].ToString());
         oSol.tecnico = sRow["nombres"].ToString() + "  " + sRow["apellidos"].ToString();
         oSol.referencia = oSol.tecnico + "   Cel. " + sRow["telefono"].ToString();
         txtTecnico.Text = oSol.tecnico;
     }
 }
Пример #3
0
        private void cmdequipo_Click(object sender, EventArgs e)
        {
            int[] aCols = { 150, 150, 150, 150,150,150 };
            string cat = "imagenes.equipos";
            Clases.cCatalogo oCat;
            DataTable dt = dtEquipos.Clone();
            DataRow sRow;

            if (oSol.idubica == -1)
                oCat = new cCatalogo(dtEquipos, "Catalogo de equipos", cat, aCols,  true);
            else
            {
                foreach (DataRow dr in dtEquipos.Rows)
                    if (int.Parse(dr["idubica"].ToString()) == oSol.idubica)
                        dt.ImportRow(dr);

                oCat = new cCatalogo(dt, "Catalogo de equipos", cat, aCols, true);

            }

            sRow = oCat.retornaFila();
            oCat = null;
            if (!(sRow == null))
            {
                oSol.idequipo = int.Parse(sRow["idequipo"].ToString());
                //  Valida que equipo no este en mantenimiento
                for (int i = 0; i < dtMntto.Rows.Count; i++)
                {
                    if (oSol.idequipo == int.Parse(dtMntto.Rows[i]["idequipo"].ToString()))
                    {
                        MessageBox.Show("EQUIPO YA ESTA EN MANTENIMIENTO..", "REVISE POR FAVOR..");
                        return;
                    }
                }

                oSol.idtipoequipo = int.Parse(sRow["idtipoequipo"].ToString() );
                oSol.tipoequipo = sRow["tipoequipo"].ToString() ;
                oSol.serie = sRow["serie"].ToString();
                oSol.seriecse = sRow["seriecse"].ToString();
                oSol.color = sRow["color"].ToString();
                oSol.categoria = sRow["categoria"].ToString();
                txtTipoEq.Text = oSol.categoria + ":  "+ oSol.tipoequipo + " - Serie:   " + oSol.serie   ;
                txtSerieCSE.Text = oSol.seriecse;

            }
        }
Пример #4
0
 private void cmdPersonaRecibe_Click(object sender, EventArgs e)
 {
     int[] aCols = { 100, 200,200,200 };
     DataRow sRow;
     Clases.cCatalogo oCat = new cCatalogo(dtPersonas, "Catalogo de Personas", "imagenes.personas", aCols, true);
     sRow = oCat.retornaFila();
     oCat = null;
     if (!(sRow == null))
     {
         oSol.cedularecibe = sRow["cedula"].ToString();
         oSol.nombresrecibe = sRow["nombres"].ToString();
         oSol.apellidosrecibe = sRow["apellidos"].ToString();
         oSol.cargorecibe = sRow["cargo"].ToString();
         txtPersonaRecibe.Text = oSol.nombresrecibe + "  " + oSol.apellidosrecibe;
     }
 }
Пример #5
0
        //  Presenta tabla personas que entregan/reciben
        private void cmdBuscar1_Click(object sender, EventArgs e)
        {
            int[] aCols = { 150, 200, 200, 200 };
            DataRow sRow;
            Clases.cCatalogo oCat;

            oCat = new cCatalogo(dtPersonas, "Catalogo personas", "imagenes.personas", aCols, true);
            sRow = oCat.retornaFila();
            oCat = null;
            if (sRow != null)
                {
                    oSol.cedulaentrega = sRow["cedula"].ToString();
                    oSol.nombresentrega = sRow["nombres"].ToString();
                    oSol.apellidosentrega = sRow["apellidos"].ToString();
                    txtnombres.Text = sRow["nombres"].ToString() + " " + sRow["apellidos"].ToString();
                    txtcedulaEntrega.Text = oSol.cedulaentrega;

                }
        }