示例#1
0
        public FormaListaP()
        {
            string strConexion = "server=" + cxml.Text("ACUANET/BD/SBD_ip", "127.0.0.1")
                + ";uid=" + cxml.Text("ACUANET/BD/SBD_usuario", "root")
                + ";pwd=" + cxml.Text("ACUANET/BD/SBD_passwd", "")
                + ";database=" + cxml.Text("ACUANET/BD/SBD_bdn", "ntritondb");

            modp = new ModParticipante(strConexion);

            InitializeComponent();
        }
示例#2
0
        //este metodo recupera los datos y los manda a insertar a la BD
        private void btnAgegarR_Click(object sender, EventArgs e)
        {
            //se crea el participante "en memoria"
            Participante par = new Participante();

            //se asignana los valores
            par.nombre = text_nombre.Text;
            par.snumero = txt_numero.Text;
               par.categoria = this.cb_categoria.SelectedValue.ToString();

            par.sclub = txt_club.Text;
            par.direcc = txt_direccion.Text;
            par.email = txt_email.Text;
            par.prueba = txt_prueba.Text;
            par.id_tag = sTag;

            par.sexo = "F";
            if (this.radioM.Checked)
            {
                par.sexo = "M";
            }

            par.pais = tb_pais.Text;

            //se prepara la conexion a la BD
            string strConexion = "server=" + cxml.Text("ACUANET/BD/SBD_ip", "127.0.0.1")
                + ";uid=" + cxml.Text("ACUANET/BD/SBD_usuario", "root")
                + ";pwd=" + cxml.Text("ACUANET/BD/SBD_passwd", "")
                + ";database=" + cxml.Text("ACUANET/BD/SBD_bdn", "ntritondb");
            //MessageBox.Show(strConexion);
            ModParticipante modp = new ModParticipante(strConexion);

            //se crea el particiapante
            if (modp.crearP(par))
            {
                MessageBox.Show("Se creo correctamente el participante", "Notificacioon", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se creo el participante", "Notificacioon", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
示例#3
0
        private void escanerChip_Load(object sender, EventArgs e)
        {
            cargaConfig();

            strConexion = "server=" + cxml.Text("ACUANET/BD/SBD_ip", "127.0.0.1")
                + ";uid=" + cxml.Text("ACUANET/BD/SBD_usuario", "root")
                + ";pwd=" + cxml.Text("ACUANET/BD/SBD_passwd", "")
                + ";database=" + cxml.Text("ACUANET/BD/SBD_bdn", "ntritondb");

            modP = new ModParticipante(strConexion);

            Application.DoEvents();

            if (reader.connect())
            {
                setupReader();
                reader.purgeAllTags();
                server.Start();
            }
            else
            {
                MessageBox.Show("Problemas en la configuración de la antena", "Problema", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            Application.DoEvents();

            server.TagReceiveEvent += new TagReceiveEventHandler(this.AccessControl_TagReceiveEvent);
        }