Example #1
0
        private void login_button_Click(object sender, EventArgs e)
        {
            SingleTon.SetUser(Username_TB.Text);

            List <string>[] list = mysql.SelectLogin();
            if (UserCheck(list[0], list[1], Username_TB.Text, Password_TB.Text))
            {
                SingleTon.SetID(ID_);
                Form2 form2 = new Form2();
                form2.Show();
                this.Hide();
            }
            else
            {
                Form error = new error_login();
                error.Show();
                Username_TB.Text = "";
                Password_TB.Text = "";
            }
        }
Example #2
0
        private void RFID_Click(object sender, EventArgs e)
        {
            RFID   RFid = new RFID();
            string ID   = RFid.main();
            string PIN  = RFid.RFID_PIN();

            ID  = ID.Remove(0, 1);
            PIN = PIN.Remove(0, 1);
            List <string>[] RFIDd = mysql.RFID();
            if (RFID_check(RFIDd[0], RFIDd[1], ID.Remove(12, 1), PIN.Remove(PIN.Length - 1, 1)))
            {
                SingleTon.SetID(ID_);
                Form2 form2 = new Form2();
                form2.Show();
                this.Hide();
            }
            else
            {
                Form error = new error_login();
                error.Show();
                Username_TB.Text = "";
                Password_TB.Text = "";
            }
        }