static void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (pVal.ActionSuccess && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD) { SAPbouiCOM.Form lObjForm = Application.SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount); if (pVal.FormTypeEx.Equals(Constants.STR_AR_INVOICE_FORM) || pVal.FormTypeEx.Equals(Constants.STR_ADVANCE_FORM) || pVal.FormTypeEx.Equals(Constants.STR_RESERVE_FORM)) { new ComissionModal(UIApplication.GetCompany(), lObjForm); } if (pVal.FormTypeEx.Equals(Constants.STR_AR_INVOICE_FORM) || pVal.FormTypeEx.Equals(Constants.STR_RESERVE_FORM)) { new BonusModal(UIApplication.GetCompany(), lObjForm); } if (pVal.FormTypeEx.Equals(Constants.STR_EXTERNAL_STATEMENT_FORM)) { //new BankExtractsImporting(UIApplication.GetCompany(), lObjForm); } } } catch (Exception e) { } }
public PermissionsEnum.Permission GetPermissionType(string pStrCostCenter, string pStrType) { PermissionsEnum.Permission lObjPermissionEnum = new PermissionsEnum.Permission(); lObjPermissionEnum = PermissionsEnum.Permission.None; string lStrUserCode = UIApplication.GetCompany().UserName; if (Permission_Purchases(lStrUserCode, "Permission_Authorizes_Operations", "", pStrType) || (lStrUserCode == "MAQUINARIA" && pStrCostCenter == "MQ_MAQUI")) { lObjPermissionEnum = PermissionsEnum.Permission.AuthorizeOperations; } else if (Permission_Purchases(lStrUserCode, "Permission_Purchases", "", pStrType)) { lObjPermissionEnum = PermissionsEnum.Permission.Purchase; } else if (Permission_Purchases(lStrUserCode, "Permission_Authorize_Purchases", pStrCostCenter, pStrType)) { lObjPermissionEnum = PermissionsEnum.Permission.AuthorizePurchase; } return(lObjPermissionEnum); }