示例#1
0
        private void cmdComponente_Click(object sender, EventArgs e)
        {
            int[] aCols = { 100, 250 };
                string cat = "imagenes.catcomponentes";

                DataRow sRow;
                Clases.cCatalogo oCat = new Clases.cCatalogo(dtComponentes, "Catalogo de Componentes", cat, aCols, true);
                sRow = oCat.retornaFila();
                oCat = null;
                if (!(sRow == null))
                {
                    oComp.idcomponente = int.Parse(sRow["idcomponente"].ToString());
                    oComp.componente = sRow["componente"].ToString();
                    txtComponente.Text = oComp.componente;
                }
        }
示例#2
0
        private void cmdUbica_Click(object sender, EventArgs e)
        {
            // Seleccionar desde el catalogo de Ubicaciones y permite agregar nuevo item
            int[] aCols = { 100, 250 };
            string cat = "imagenes.catubica";

            DataRow sRow;
            Clases.cCatalogo oCat = new Clases.cCatalogo(dtUbica, "Catalogo de Ubicaciones", cat, aCols, true);
            sRow = oCat.retornaFila();
            oCat = null;
            if ((sRow != null))
            {
                oPer.idubica = int.Parse(sRow["idubica"].ToString());
                oPer.ubica = sRow["ubica"].ToString();
                txtUbica.Text = oPer.ubica;
            }
        }
示例#3
0
        private void cmdMarca_Click(object sender, EventArgs e)
        {
            if (modo == "A")
            {
                // Seleccionar desde el catalogo Tipo de Componentes y permite agregar nuevo tipo
                if (oComp.idcomponente == 0)     //  No ha sido seleccionado el componente
                {
                    MessageBox.Show("NO HAY componente seleccionado para poder seleccionar una Marca");
                    return;
                }
            }
            int[] aCols = { 100, 250 };
            string cat = "imagenes.catmarcas";

            DataRow sRow;
            Clases.cCatalogo oCat = new Clases.cCatalogo(dtMarcas, "Catalogo de Marcas", cat, aCols, true);
            sRow = oCat.retornaFila();
            oCat = null;
            if (!(sRow == null))
            {
                oComp.idmarca  = int.Parse(sRow["idmarca"].ToString());
                oComp.marca = sRow["marca"].ToString();
                txtMarca.Text = oComp.marca;
            }
        }