private void DisableControls() { CurrentUser.UserPermissions = RefreshUserPermissions(CurrentUser.AdminUser.ID); if (objOffer.FromTemplate) { DisabledAttribute = ((CurrentUser.UserPermissions.EditOffer && !ucTemplateLockableFields.RewardTemplateFieldSource.DisallowEdit) ? false : true); } else if (objOffer.IsTemplate) { DisabledAttribute = CurrentUser.UserPermissions.EditTemplates ? false : true; } else { DisabledAttribute = CurrentUser.UserPermissions.EditOffer ? false : true; } //If disable is set to false, check Buyer conditions if (!DisabledAttribute) { if (m_CommonInc.LRTadoConn.State == ConnectionState.Closed) { m_CommonInc.Open_LogixRT(); } DisabledAttribute = ((CurrentUser.UserPermissions.EditOffersRegardlessBuyer || m_CommonInc.IsOfferCreatedWithUserAssociatedBuyer(CurrentUser.AdminUser.ID, OfferID)) ? false : true); m_CommonInc.Close_LogixRT(); //Hide save button if Disable is true btnSave.Visible = !DisabledAttribute; } }
private void DisableControls() { if (!IsTemplate) { TempDisallow.Visible = false; } if (!IsTemplate) { DisabledAttribute = ((CurrentUser.UserPermissions.EditOffer && !(FromTemplate && OfferEligibileSVCondition.DisallowEdit)) ? false : true); } else { DisabledAttribute = CurrentUser.UserPermissions.EditTemplates ? false : true; } //If disable is set to false, check Buyer conditions if (EngineID == 9 && !DisabledAttribute) { if (MyCommon.LRTadoConn.State == ConnectionState.Closed) { MyCommon.Open_LogixRT(); } DisabledAttribute = ((CurrentUser.UserPermissions.EditOffersRegardlessBuyer || MyCommon.IsOfferCreatedWithUserAssociatedBuyer(CurrentUser.AdminUser.ID, OfferID)) ? false : true); MyCommon.Close_LogixRT(); } if (DisabledAttribute) { functionradio1.Enabled = false; functionradio2.Enabled = false; functioninput.Enabled = false; lstAvailable.Enabled = false; lstSelected.Enabled = false; txtValueNeeded.Enabled = false; select1.Enabled = false; deselect1.Enabled = false; btnSave.Visible = false; btnCreate.Enabled = false; } if (!bCreateGroupOrProgramFromOffer || !CurrentUser.UserPermissions.CreateStoredValuePrograms || EngineID != 0) { btnCreate.Visible = false; } if ((bEnableRestrictedAccessToUEOfferBuilder && isTranslatedOffer) || (bEnableAdditionalLockoutRestrictionsOnOffers && !bOfferEditable) || m_OAWService.CheckIfOfferIsAwaitingApproval(OfferID).Result) { btnSave.Visible = false; } }
private void DisableControls() { if (!objOffer.IsTemplate) { DisabledAttribute = ((CurrentUser.UserPermissions.EditOffer && !(objOffer.FromTemplate && objPassThrough.DisallowEdit)) ? false : true); } else { DisabledAttribute = CurrentUser.UserPermissions.EditTemplates ? false : true; } //If disable is set to false, check Buyer conditions if (objOffer.EngineID == 9 && !DisabledAttribute) { if (MyCommon.LRTadoConn.State == ConnectionState.Closed) { MyCommon.Open_LogixRT(); } DisabledAttribute = ((CurrentUser.UserPermissions.EditOffersRegardlessBuyer || MyCommon.IsOfferCreatedWithUserAssociatedBuyer(CurrentUser.AdminUser.ID, OfferID)) ? false : true); MyCommon.Close_LogixRT(); } if (DisabledAttribute) { btnSave.Visible = false; } if ((bEnableRestrictedAccessToUEOfferBuilder && isTranslatedOffer) || (bEnableAdditionalLockoutRestrictionsOnOffers && !bOfferEditable) || m_OAWService.CheckIfOfferIsAwaitingApproval(OfferID).Result) { btnSave.Visible = false; } }