Esempio n. 1
0
        private void button7_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Esta Seguro que Quiere Eliminar a este Jugador ", "AFC - ELIMINAR JUGADOR", MessageBoxButtons.YesNoCancel);

            if (result == DialogResult.Yes)
            {
                ClassConnectDataBase delete = new ClassConnectDataBase();
                MessageBox.Show(delete.delete_user(textBox3.Text), "AFC - JUGADOR ELIMINADO", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        protected virtual void registerUser()
        {
            SetStatus("Registrando...");
            ClassConnectDataBase crud = new ClassConnectDataBase();
            string result             = crud.insert(txt_name.Text, txt_lastname.Text, teamName, txt_carnet.Text + " " + ciudadaCarnet, txt_phono.Text, "", "",
                                                    "", positionName, txt_date.Text, nameCode, arrayTemplate[0], arrayTemplate[1],
                                                    iddivision, idteam);

            SetStatus("REGISTRO REALIZADO CORRECTAMENTE");
            Message(result);
        }
        private void RegisterUser_Load(object sender, EventArgs e)
        {
            ClassConnectDataBase db = new ClassConnectDataBase();

            combo_division.DataSource    = db.getDivision();
            combo_division.DisplayMember = "name";
            combo_division.ValueMember   = "id";

            combo_team.DataSource    = db.getTeam();
            combo_team.DisplayMember = "name";
            combo_team.ValueMember   = "id";
        }
Esempio n. 4
0
        private void VerificationUser_Load(object sender, EventArgs e)
        {
            try
            {
                search = new ClassConnectDataBase();
                Init();
                Start();
            }
            catch
            {
                MessageBox.Show("ERROR", "Iniciando lector de huella");
            }

            //Verify();
            //Init();
            //Start();
        }
Esempio n. 5
0
        protected override void registerUser()
        {
            MemoryStream fingerdata = new MemoryStream();

            base.Enroller.Template.Serialize(fingerdata);
            fingerdata.Position = 0;
            BinaryReader br = new BinaryReader(fingerdata);

            Byte[] bytes           = br.ReadBytes((Int32)fingerdata.Length);
            ClassConnectDataBase c = new ClassConnectDataBase();

            string result = c.update(int.Parse(textBox3.Text), txt_name.Text, txt_lastname.Text, teamName, txt_carnet.Text + " " + ciudadaCarnet, txt_phono.Text, "", "",
                                     "", positionName, txt_date.Text, nameCode, arrayTemplate[0], arrayTemplate[1]);

            SetStatus("Datos Actualizados Correctamente");
            Message(result);
        }
Esempio n. 6
0
        public void Verify()
        {
            ClassConnectDataBase classBio = new ClassConnectDataBase();

            DataTable table = classBio.getDataWithTwoFingers("");

            int i = table.Rows.Count;

            for (int items = 0; items < i; items++)
            {
                byte[]          fingerBufferOne = (byte[])table.Rows[items]["fingerOne"];
                byte[]          fingerBufferTwo = (byte[])table.Rows[items]["fingerTwo"];
                DPFP.Template[] arrayTemplate   = new DPFP.Template[2];
                arrayTemplate[0] = getTemplate(fingerBufferOne);
                arrayTemplate[1] = getTemplate(fingerBufferTwo);
                ListTemplate.Add(table.Rows[items]["Id"].ToString(), arrayTemplate);
            }
        }
        /// <summary>
        /// This is a examplo method.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button5_Click(object sender, EventArgs e)
        {
            try
            {
                ClassConnectDataBase db    = new ClassConnectDataBase();
                DataTable            tabla = db.getDivisionTeamsID(combo_division.SelectedValue.ToString(), combo_team.SelectedValue.ToString());
                string iddivison           = tabla.Rows[0]["id"].ToString();
                MessageBox.Show(iddivison);


                tabla = db.getChampionsId(combo_division.SelectedValue.ToString());
                string idchampion = tabla.Rows[0]["championship_id"].ToString();
                MessageBox.Show(idchampion);

                // this is a examplo
                db.insertDivisionTeamsPLayers("5334", iddivison, idchampion);
            }
            catch
            {
                MessageBox.Show("El Equipo Seleccionado no tiene la Division Seleccionada", "AFC Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Esempio n. 8
0
        private void getUerData(string keysTemplate)
        {
            try
            {
                MakeReport("Jugador no Encontrado en la Base de Datos de AFC ");
                ClassConnectDataBase classBiometric = new ClassConnectDataBase();
                DataTable            table          = classBiometric.getDatawithTwoFinger(keysTemplate);


                name         = table.Rows[0]["Name"].ToString();
                last_name    = table.Rows[0]["last_name"].ToString();
                nickname     = table.Rows[0]["nickname"].ToString();
                ci           = table.Rows[0]["ci"].ToString();
                height       = table.Rows[0]["height"].ToString();
                weight       = table.Rows[0]["weight"].ToString();
                skillful_leg = table.Rows[0]["skillful_leg"].ToString();
                position     = table.Rows[0]["position"].ToString();
                birthday     = table.Rows[0]["birthday"].ToString();


                ftp ftpClient = new ftp(@"ftp://sidbol.com", ConstactsCreadentials.userName, ConstactsCreadentials.pass);

                /* Upload a File */
                ftpClient.download("public_html/afc/app/webroot/img/players/sm_" + table.Rows[0]["image"].ToString() + ".jpg", Application.StartupPath + "\\Images\\sm_" + table.Rows[0]["image"].ToString() + ".jpg");

                pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
                pictureBox1.Image    = Image.FromFile(Application.StartupPath + "\\Images\\sm_" + table.Rows[0]["image"].ToString() + ".jpg");

                UserName(name, last_name, nickname, ci, height, weight, skillful_leg, position, birthday);
                btn();
            }
            catch
            {
                //Message("*************** There is a Problem, please try again ******************");
            }
        }
Esempio n. 9
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     search = new ClassConnectDataBase();
     dataGridView1.DataSource = search.search_Users(textBox1.Text);
 }
Esempio n. 10
0
 private void Search_Users_Load(object sender, EventArgs e)
 {
     search = new ClassConnectDataBase();
 }
Esempio n. 11
0
        private void button5_Click(object sender, EventArgs e)
        {
            ClassConnectDataBase delete = new ClassConnectDataBase();

            MessageBox.Show(delete.delete_user(textBox3.Text), "Eleminar Jugador");
        }