Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            MySqlConnection con = new MySqlConnection("server=localhost;user id=root;database=cazier_judiciar");

            con.Open();
            ip = Get_IP.obtine_IP(ip);
            string           newcon = "select * from administratori_cazier where Username = '******' and Password = '******' and IP= '" + ip + "'";
            MySqlDataAdapter adp    = new MySqlDataAdapter(newcon, con);
            DataSet          ds     = new DataSet();

            adp.Fill(ds);
            DataTable dt = ds.Tables[0];

            if (dt.Rows.Count == 1)
            {
                Lucru_cu_Baza_Cazier lbc = new Lucru_cu_Baza_Cazier();
                lbc.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Login Invalid");
            }



            con.Close();
        }
Example #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Lucru_cu_Baza_Cazier lbc = new Lucru_cu_Baza_Cazier();

            lbc.Show();
            this.Hide();
        }