Exemplo n.º 1
0
 public void AuthorizeForm()
 {
     newToolStripButton.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                   _wph.ItemName(WorkshopPermissionHelper.Operation.AddVendors));
     btnDelete.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                          _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteVendors));
 }
Exemplo n.º 2
0
 public void AuthorizeForm()
 {
     BtnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _wph.ItemName(WorkshopPermissionHelper.Operation.AddContract));
     BtnSaveNew.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                           _wph.ItemName(WorkshopPermissionHelper.Operation.AddNewMicelaneousItem));
 }
Exemplo n.º 3
0
 public void AuthorizeForm()
 {
     btnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _wph.ItemName(WorkshopPermissionHelper.Operation.UpdatePMService));
     btnDelete.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                          _wph.ItemName(WorkshopPermissionHelper.Operation.DeletePMService));
 }
Exemplo n.º 4
0
 public void AuthorizeForm()
 {
     btnNew.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                       _wph.ItemName(WorkshopPermissionHelper.Operation.AddContract));
     BtnDelete.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                          _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteContract));
 }
Exemplo n.º 5
0
 public void AuthorizeForm()
 {
     BtnSaveAndNew.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                              _wph.ItemName(WorkshopPermissionHelper.Operation.AddEquipment));
     saveToolStripButton.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                    _wph.ItemName(
                                                        WorkshopPermissionHelper.Operation.AddEquipment));
 }
Exemplo n.º 6
0
 public void AuthorizeForm()
 {
     BtnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _wph.ItemName(WorkshopPermissionHelper.Operation.UpdateMaintenanceTask));
     PartsGridView.OptionsBehavior.Editable = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                               _wph.ItemName(WorkshopPermissionHelper.Operation.AddPart));
     newLabour.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                          _wph.ItemName(WorkshopPermissionHelper.Operation.AddLaborUnit));
     btnDeleteLabour.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteLaborUnit));
     btnDeletePart.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                              _wph.ItemName(WorkshopPermissionHelper.Operation.DeletePart));
 }
Exemplo n.º 7
0
 public void AuthorizeForm()
 {
     BtnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _whp.ItemName(WorkshopPermissionHelper.Operation.UpdateEquipment));
     btnNewInsurance.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                _whp.ItemName(
                                                    WorkshopPermissionHelper.Operation.AddEquipmentAttachment));
     btnDeleteInsurance.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                   _whp.ItemName(
                                                       WorkshopPermissionHelper.Operation.
                                                       DeleteEquipmentInsurance));
     expirationGridView.OptionsBehavior.Editable = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION, _whp.ItemName(WorkshopPermissionHelper.Operation.AddNewEquipmentExpiration));
     btnDeleteExpiration.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                    _whp.ItemName(
                                                        WorkshopPermissionHelper.Operation.
                                                        DeleteEquipmentExpiration));
     btnNewAttachment.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                 _whp.ItemName(
                                                     WorkshopPermissionHelper.Operation.AddEquipmentAttachment));
     btnRead.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _whp.ItemName(WorkshopPermissionHelper.Operation.ReadEquipmentAttachment));
     btnDeleteAttachment.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                    _whp.ItemName(
                                                        WorkshopPermissionHelper.Operation.
                                                        DeleteEquipmentAttachment));
 }
Exemplo n.º 8
0
        public void AuthorizeForm()
        {
            BtnCancelContract.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                         _wph.ItemName(WorkshopPermissionHelper.Operation.CancelContract));
            BtnRenew.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                _wph.ItemName(WorkshopPermissionHelper.Operation.RenewContract));

            BtnSaveContract.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                       _wph.ItemName(WorkshopPermissionHelper.Operation.UpdateContract));

            BtnDeleteContract.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                         _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteContract));
            BtnPrint.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                _wph.ItemName(WorkshopPermissionHelper.Operation.PrintContract));

            BtnNewEqu.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                 _wph.ItemName(WorkshopPermissionHelper.Operation.AddEquipment));
            BtnDeleteEqu.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                    _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteEquipment));
            BtnIssueWorkOrder.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                         _wph.ItemName(WorkshopPermissionHelper.Operation.IssueWorkorder));
        }
Exemplo n.º 9
0
        public void AuthorizeForm()
        {
            btnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                               _wph.ItemName(WorkshopPermissionHelper.Operation.UpdateCustomer));
            btnNewContract.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                      _wph.ItemName(WorkshopPermissionHelper.Operation.AddContract));
            btnDeleteContract.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                         _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteContract));

            btnNewEqu.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                 _wph.ItemName(WorkshopPermissionHelper.Operation.AddEquipment));
            btnDeleteEqu.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                    _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteEquipment));
            btnIssueWorkorder.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                         _wph.ItemName(WorkshopPermissionHelper.Operation.IssueWorkorder));
        }
Exemplo n.º 10
0
 public void AuthorizeForm()
 {
     btnInvoiceSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                               _wph.ItemName(WorkshopPermissionHelper.Operation.GenerateInvoice));
     btnInvoicDelete.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteInvoice));
     btnMiNew.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                         _wph.ItemName(WorkshopPermissionHelper.Operation.AddNewMicelaneousItem));
     btnDeleteMISC.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                              _wph.ItemName(
                                                  WorkshopPermissionHelper.Operation.DeleteMicelaneousItem));
     btnPyNew.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                         _wph.ItemName(WorkshopPermissionHelper.Operation.RecordPayment));
     btnDeletePayment.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                 _wph.ItemName(
                                                     WorkshopPermissionHelper.Operation.DeletePaymentRecord));
 }
Exemplo n.º 11
0
 public void AuthorizeForm()
 {
     btnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _wph.ItemName(WorkshopPermissionHelper.Operation.AddNewMicelaneousItem)) || _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                                                                                                     _wph.ItemName(WorkshopPermissionHelper.Operation.UpdateMiscelaneousItem));
 }
Exemplo n.º 12
0
 public void AuthorizeForm()
 {
     saveToolStripButton.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                    _wph.ItemName(WorkshopPermissionHelper.Operation.AddLaborUnit));
 }
Exemplo n.º 13
0
 public void AuthorizeForm()
 {
     btnpySave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                          _wph.ItemName(
                                              WorkshopPermissionHelper.Operation.UpdateRecordPayment));
 }
Exemplo n.º 14
0
 public void AuthorizeForm()
 {
     BtnDelete.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                          _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteEquipment));
 }
Exemplo n.º 15
0
 public void AuthorizeForm()
 {
     BtnSave.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                        _wph.ItemName(WorkshopPermissionHelper.Operation.AddPart));
 }
Exemplo n.º 16
0
        /// <summary>
        /// Check user security information and load/unload requested modules
        /// </summary>
        private void LoadModules()
        {
            var loadWorkshop   = permission.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION, wph.ItemName(WorkshopPermissionHelper.Task.LoadModule));
            var loadFleet      = permission.IsAuthorized(PermissionManager.FLEET_APPLICATION, flph.ItemName(FleetPermissionHelper.Task.LoadModule));
            var loadfixedasset = permission.IsAuthorized(PermissionManager.FIXED_ASSET_APPLICATION, faph.ItemName(FixedAssetPermissionHelper.Task.LoadModule));
            var loadhrm        = permission.IsAuthorized(PermissionManager.HRM_APPLICATION, hph.ItemName(HRMPermissionHelper.Task.LoadModule));
            var loadadmin      = permission.IsAuthorized(PermissionManager.ADMINISTRATION_APPLICATION, aph.ItemName(AdministrationPermissionHelper.Task.LoadModule));
            var loadinventory  = permission.IsAuthorized(PermissionManager.INVENTORY_APPLICATION, iph.ItemName(InventoryPermissionHelper.Task.LoadModule));

            if (loadWorkshop)
            {
                _wmsModule = new WmsModuleManager();
                AuthorizeWorkshop();
            }
            if (loadFleet)
            {
                _fleetModule = new FleetModuleManager();
                AuthorizeFleet();
            }
            if (loadfixedasset)
            {
                _fixedAssetModule = new FixedAssetModuleManager();
                AuthorizeFixedasset();
            }
            if (loadhrm)
            {
                _hrmModule = new HrmModuleManager();
                AuthorizeHrm();
            }
            if (loadadmin)
            {
                AuthorizeAdministration();
            }
            if (loadinventory)
            {
                _inventoryModule = new InventoryModuleManager();
                AuthorizeInventory();
            }


            //Hide/Show appropriate ribbon tab
            workshopRibbonPage.Visible  = loadWorkshop;
            faRibbonPage.Visible        = loadfixedasset;
            hrmRibbonPage.Visible       = loadhrm;
            fleetRibbonPage.Visible     = loadFleet;
            ribbonPage1.Visible         = loadadmin;
            inventoryRibbonPage.Visible = loadinventory;
        }
Exemplo n.º 17
0
 public void AuthorizeForm()
 {
     btninvoicedelete.Enabled = _pm.IsAuthorized(PermissionManager.WORKSHOP_APPLICATION,
                                                 _wph.ItemName(WorkshopPermissionHelper.Operation.DeleteInvoice));
 }