private void btnMasuk_Click(object sender, EventArgs e) { if (txtKodePetugas.Text == "" || txtPassword.Text == "") { msgInfo("Lengkapi terlebih dahulu Kode Petugas dan Password Petugas..."); } else if (txtKodePetugas.Text.Length > 5 || txtPassword.Text.Length > 10) { msgInfo("Kode Petugas Maksimum 5 Karakter...\nNama Petugas Maksimum 10 Karakter "); } else { Petugas lgn = new Petugas(); lgn.Kode_Petugas = txtKodePetugas.Text; lgn.Password_Petugas = txtPassword.Text; //msgInfo("Cek Records"); resultChr = lgnDAO.CheckRecord(txtKodePetugas.Text, txtPassword.Text); if (resultChr == 'Y') { lgn = lgnDAO.GetByKodePetugas(txtKodePetugas.Text); //Informasi Panel frmParent.statusStripPanel(lgn.Kode_Petugas, lgn.Nama_Petugas, lgn.Status_Petugas); if (lgn.Status_Petugas == "Administrator") { //Setting Menu Administrator frmParent.DisEnbMenuItem(true, true, true, true, true, true, true, true, true, true, false, true); } else { //Setting Menu User frmParent.DisEnbMenuItem(true, true, true, true, false, false, true, true, true, true, false, true); } //Sembunyikan Form Login; ClearTextBox(); this.Hide(); } else { msgInfo("Periksa kembali Kode Petugas dan Password yang anda masukkan !!!"); } } }