Beispiel #1
0
        private void btnreto_Click(object sender, EventArgs e)
        {
            partidos f = new partidos();

            f.MdiParent = this.MdiParent;
            f.Show();
            this.Close();
        }
Beispiel #2
0
        public void startseccion()
        {
            operaciones      oper    = new operaciones();
            string           actuser = Convert.ToString(textBox1.Text);
            SQLiteConnection cnx     = new SQLiteConnection("Data Source=C:\\bdd\\sm.s3db; Version=3;");

            try
            {
                cnx.Open();
                SQLiteDataAdapter ad;
                DataTable         dt  = new DataTable();
                SQLiteCommand     cmd = cnx.CreateCommand();
                cmd.CommandText = "select numced from cedula where numced = '" + textBox1.Text + "'";
                ad = new SQLiteDataAdapter(cmd);

                DataSet ds = new DataSet();
                ad.Fill(dt);
                ds.Tables.Add(dt);
                if (dt.Rows.Count <= 0)
                {
                    oper.consultasinreaultado("insert into cedula(numced)values('" + textBox1.Text + "')");
                    partidos f = new partidos();
                    f.MdiParent = this.MdiParent;
                    f.Show();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("Esta Persona ya voto");
                    btnini.Enabled = true;

                    try
                    {
                        if (FinalFrame.IsRunning == true)
                        {
                            FinalFrame.Stop();
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }