Ejemplo n.º 1
0
 private void Button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text == parent.passAdmin)
     {
         parent.login_as("ADMIN");
         this.Close();
     }
     else
     {
         label5.Text = "Kode administrasi salah!";
     }
 }
Ejemplo n.º 2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            String            id             = textBox1.Text.ToUpper();
            String            password       = textBox2.Text;
            String            jabatan        = "";
            OracleDataAdapter oda            = new OracleDataAdapter("SELECT J.NAMA_JABATAN FROM PEGAWAI M, JABATAN J WHERE M.ID_JABATAN=J.ID_JABATAN AND M.ID_PEGAWAI='" + id + "' AND M.PASSWORD_PEGAWAI='" + password + "'", parent.oc);
            DataTable         selectedMember = new DataTable();

            oda.Fill(selectedMember);

            if (selectedMember.Rows.Count > 0)
            {
                jabatan = selectedMember.Rows[0].Field <String>(0);
                parent.login_as(jabatan);
                parent.id_login = id;
                this.Close();
            }
            else
            {
                label4.Text = "ID/Password anda salah!";
            }
        }