void SetingPerusahaan_OnEntityAction(BaseEntity ActionEntity, enEntityActionMode ActionMode) { if (ActionMode == enEntityActionMode.AfterLoadFound) { SetingPerusahaan sp = ActionEntity as SetingPerusahaan; if (sp == null) { return; } BarItemVisibility vis = sp.MultiDepartemen ? BarItemVisibility.Always : BarItemVisibility.Never; mnDepartemen.Visibility = vis; vis = sp.MultiProyek ? BarItemVisibility.Always : BarItemVisibility.Never; mnProyek.Visibility = vis; vis = sp.MultiMataUang ? BarItemVisibility.Always : BarItemVisibility.Never; mnMataUang.Visibility = vis; mnKursHarian.Visibility = vis; mnNilaiTukarSaldoAwal.Visibility = vis; } }
public static BarItemVisibility KiemTraChucNang_Form(string _machucnang) { BarItemVisibility result = BarItemVisibility.Never; try { if (GlobalSettings.UserCode == KeyTrongPhanMem.AdminUser_key) { result = BarItemVisibility.Always; } else { PHANQUYENTAIKHOAN _phanquyen = PhanQuyenTaiKhoanLogic.SelectTheoMaChucNang(_machucnang); if (_phanquyen != null) { result = BarItemVisibility.Always; } } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Error(ex); } return(result); }
// New menu private void AppNewMenu_BeforePopup(object sender, CancelEventArgs e) { bool v = SS.I.UserInfo.Privileges.HasPrivilege("Administrator"); BarItemVisibility biv = v ? BarItemVisibility.Always : BarItemVisibility.Never; NewSpotfireLinkButtonItem.Visibility = BarItemVisibility.Never; // disable for now (was: biv) }