Exemplo n.º 1
0
        private void buttonSimpan_Click(object sender, EventArgs e)
        {
            if (textPassword.Text != textUlangPassword.Text)
            {
                MessageBox.Show("Password tidak sama");
                return;
            }

            Username = textUsername.Text;
            Password = textPassword.Text;

            DatabaseClass.InsertSQL(
                "account",
                "idaccount, username, password, created_date",
                " 2, '" + Username + "', MD5('" + Password + "'), '" + DateTime.Now.ToString("yyyy-MM-dd HH:MM:ss") + "'"
                );
            ObjStatus(false);
        }
Exemplo n.º 2
0
        private void buttonLogin_Click(object sender, EventArgs e)
        {
            Username = textUsername.Text;
            Password = textPassword.Text;

            string username = DatabaseClass.ExecSQL(
                "username",
                "account",
                "username='******' AND password =MD5('" + Password + "')");

            if (username == null)
            {
                MessageBox.Show("Password Salah");
            }
            else
            {
                (new AddAccount()).Show();
                this.Hide();
            }
        }