Arsip: membuat form otoritas user
more 12 years ago
ridi
ass,
gan, punten (sunda) pndatang baru mau numpang tanya nih,,
sy lagi coba bikin pengaturan menu lewat beberapa form (Sebut sja, form otoritas user,)
form ini gunanya buat ngatur submenu apa aj yang ditampilin di menu berdasarkan grup yang dibuat di form otoritas user.
mksudnya supaya ada pembatasan hak akses antara admin sma user,
biar ad sdkit gmbaran contohnya gini gan...
submenu yang ditampilin bwt admin : input data barg, input data karyawan, otoritaas user, form transaksi, laporan
submenu yang ditampilin bwt user : form transaksi, laporan
mohon bantuannya gan, (kalo bisa skalian source codenya..hehehe)
more 12 years ago
mas_kofa
kalo cara simple...bikin ja 2 TMainMenu,
saat login nanti jika user (misal) pilih MainMenu1, dan jika admin pilih MainMenu2...
if user = 'user' then
Form1.Menu := MainMenu1 else
Form1.Menu := MainMenu2;
more 12 years ago
madi
@maskofa
kurang efektif mas broo :D
coba ane jawab yah..
asumsinya, ente punya table operator / user dg field2 sbb :
nama,namalogin,password, field1,field2,field3 dst..
field1 dst bernilai integer / smallint
with query do
begin
if field[3].Value = 0 then
Fmain.Penjualan.Enable := False
else
Fmain.Penjualan.Enable := True;
end;
more 12 years ago
ridi
@ mas kofa, thanks sarannya
tapi, cara ntu udh ane coba, dn ternyata hanya 2 user yg bisa pake (admin, user)
permasalahannya, gimana kalo pngen nambah user, dan menu yang ditampilkan diatur berdasarkan grup di form otoritas user
biar lebih jelas, bisa dilihat contoh formnya disni http://www.medialabsolution.com/Manual/Manual%20MedReg.pdf
mohon dibantu gaan.. :D
more 12 years ago
d4mnf1y32
if not ('Admin') then
begin
mainmenu1.Items.Items[3].Enabled:=false;
mainmenu1.Items.Items[1].Enabled:=true;
mainmenu1.Items.Items[0].Items[1].Enabled:=false;
end else
begin
mainmenu1.Items.Items[3].Enabled:=true;
mainmenu1.Items.Items[1].Enabled:=true;
mainmenu1.Items.Items[0].Items[1].Enabled:=true;
end;
contohnya gini aja bro..mau berapa jenis user juga ga ada masalah, tinggal atur2 aja if..then..else nya..
selamat dicoba..
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 4 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Gairah baru
by Tbawor in Hal umum tentang Pascal Indonesia more 16 years ago - cara bikin no id pasien buat program dokter
by rizu in Tip n Trik Pemrograman more 16 years ago - tanya bikin aplikasi compres data
by ingusan in Tip n Trik Pemrograman more 17 years ago - Fast Report dalam EXE ?
by himen81 in Hal umum tentang Pascal Indonesia more 17 years ago - [Tanya] InterBase Express (IBX)
by babypigs in Tutorial & Community Project more 16 years ago - konversi *.bmp atau *.jpg
by dinox in Multimedia & Graphic Enhancement more 18 years ago - Menutup Aplikasi
by deLogic in Enginering more 19 years ago - [tanya] delete data di dbgrid
by serif in Tutorial & Community Project more 12 years ago - hasil SELECT ga muncul semua
by ekseumaineur in MySQL more 18 years ago - Port Untuk Ngegunain Sensor
by saysansay in OOT more 18 years ago