Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            MainLoginPage mainloginpage = new MainLoginPage();

            mainloginpage.ShowDialog();
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
           
            string voted = "UPDATE voters SET voted = 1 WHERE id = '" + id + "' ;";
            //string voted = "UPDATE voters SET voted = 1 WHERE id = '30' ;";
            SqlConnection myConn = new SqlConnection(myConnection);
            SqlCommand cmd = new SqlCommand(voted, myConn);
            SqlDataReader dbr;

            try
            {
                myConn.Open();
                dbr = cmd.ExecuteReader();
                core.CaptureFinalize();
                core.Finalizer();
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            this.Hide();

            MainLoginPage mainLogin = new MainLoginPage();
            mainLogin.ShowDialog();

        }