Arsip: Membuat Hak akses user multi form

 
user image
more 18 years ago

onsir

Misal saya buat aplikasi multi form lalu saya simpan hak akses tsb kedalam tabe di field Hakakses cth: user A = 001 0 : form akan enable=false 1 : form akan enable=true lalu bagaimana cara membacanya pada saat user login, misal user A hak aksesnya =001, maka menu financial, HRD enable=False menu Inventory enable=True; Apakah harus membuat array nama menu atau bagaimana. Atas bantuan rekan-rekan saya ucapkan terima kasih
user image
more 18 years ago

ImanD

tambahkan az 1 field di tabel user,yg menyimpan urutan menu atw apapun simple sample : 1. File 2. -Customer 3. -Level Access 4. -Exit =================== ID_user || Name || Access || =================== 01 || ImanD || 1111 || 02 || esafm || 1101 || =================== setelah login load Fields Access{saat onShow bisa pke ComponentCount<jika 1 maka enable/visibled=true jika 0 kebalikannya>}
user image
more 18 years ago

ichan29

nambahin biar lebih jelas lg: if Components[i] is TMenuItem then if (Components[i] as TMenuItem).Tag=ConnExec.FieldByName('MenuID').AsInteger then (Components[i] as TMenuItem).Enabled := ConnExec.FieldByName('Access').AsString='1';
user image
more 18 years ago

DelphiExpert

pake ini aja http://www.esnips.com/doc/de6ccc4c-f327-4ec5-91cf-ca9ee66c85d6/Account-Manager-1.5-for-Delphi-3-7-Preview xixixix ... ...more... :mrgreen:
user image
more 18 years ago

deLogic

@DE: ehmm.. numpang jualan nih ye... hehehe.. :D
user image
more 18 years ago

DelphiExpert

iya... :mrgreen: ayo ayo... di obral di obraaaal.... xixix
user image
more 18 years ago

ichan29

kali aja.. :D
user image
more 18 years ago

DelphiExpert

:mrgreen: kali aja apaaah... hihihi :)
user image
more 18 years ago

onsir

Kalau yg ini bisa untuk menu, tapi untuk submenu masih blm bisa. if Components[i] is TMenuItem then if (Components[i] as TMenuItem).Tag=ConnExec.FieldByName('MenuID').AsInteger then (Components[i] as TMenuItem).Enabled := ConnExec.FieldByName('Access').AsString='1'; saya ada kode spt ini mungkin ada yg mau bantu Var aryMenu : array of String; I:ShortInt; Akses,T:String; begin I:=0; aryMenu[0]:='Form1.Maintenance1.Tag'; aryMenu[1]:='Form1.ItemMaster1.Tag'; aryMenu[2]:='Form1.Customer.tag'; aryMenu[3]:='Form1.CustomerDetail.tag'; //sub menu Akses:='1011'; for I:=0 to length(Akses) do T:=Copy(Akses,I+1,1); aryMenu[I]:=T; //Form1.Maintenance1.Tag:=StrToInt(T); if aryMenu[I]='0' then //if Form1.Maintenance1.Tag=0 then aryMenu[I]+'.Enabled':=False; // Form1.Maintenance1.Enabled:=False end; Bantuin ya teman-teman
user image
more 18 years ago

ichan29

lha kan.. katanya awalnya minta utk menu, makanya sy kasi contoh itu.. klo sub menunya tinggal dikratifin sedikit dong.. klo aku yg buat smua nanti yg dpt bonus bukan dikau.. coba dulu ya dan jgn cepet nyerah.. kamu pasti bisa kok
more ...
  • Pages:
  • 1
  • 2
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com