public ModifyAccessRestriction(AccessRestrictionType screentype, string IDnumber) { InitializeComponent(); label2.Text = LanguageTranslation.ACCESS_RESTRICTION_TYPE; radioButtonAlwaysOn.Text = LanguageTranslation.ALWAYS_ON; radioButtonLimitedUses.Text = LanguageTranslation.LIMITED_USES; radioButtonTimePeriod.Text = LanguageTranslation.TIME_PERIOD; radioButtonLimitTimePeriod.Text = LanguageTranslation.LIMIT_PLUS_TIME_PERIOD; label3.Text = LanguageTranslation.START_TIME; label4.Text = LanguageTranslation.END_TIME; label5.Text = LanguageTranslation.LIMITED_NUMBER_OF_USES; buttonApplyChanges.Text = LanguageTranslation.APPLY_CHANGES; buttonExit.Text = LanguageTranslation.CANCEL; buttonLimitedUses.Text = LanguageTranslation.SET_LIMITED_USES; buttonSetEndTime.Text = LanguageTranslation.SET_END_TIME; buttonSetStartTime.Text = LanguageTranslation.SET_START_TIME; Screentype = screentype; ObjectID = IDnumber; if (Screentype == AccessRestrictionType.Keypassword) { labelheadline.Text = LanguageTranslation.SET_BOX_NUMBER_ACCESS_RESTRICTIONS + IDnumber; } else { labelheadline.Text = LanguageTranslation.SET_USER_ACCESS_RESTRICTIONS + IDnumber; } HorizontalCenterLabel(labelheadline); SetAccessRestrictionType(); }
protected void RestrictStoreAccess_Changed(object sender, EventArgs e) { // disable the selection of groups if store access is not restricted AuthorizedGroups.Attributes.Remove("disabled"); AccessRestrictionType selectedVal = (AccessRestrictionType)Enum.Parse(typeof(AccessRestrictionType), RestrictStoreAccessOptions.SelectedValue); if (selectedVal != AccessRestrictionType.AuthorizedGroupsOnly) { AuthorizedGroups.Attributes.Add("disabled", "true"); } }
protected void Page_PreRender(object sender, EventArgs e) { int maxOrderId = StoreDataSource.GetMaxOrderNumber(); int nextOrderId = StoreDataSource.GetNextOrderNumber(false); if (maxOrderId >= nextOrderId) { NextOrderNumberWarning.Text = string.Format(NextOrderNumberWarning.Text, nextOrderId, maxOrderId, (maxOrderId + 1)); } else { NextOrderNumberWarning.Visible = false; } // disable the selection of groups if store access is not restricted AuthorizedGroups.Attributes.Remove("disabled"); AccessRestrictionType selectedVal = (AccessRestrictionType)Enum.Parse(typeof(AccessRestrictionType), RestrictStoreAccessOptions.SelectedValue); if (selectedVal != AccessRestrictionType.AuthorizedGroupsOnly) { AuthorizedGroups.Attributes.Add("disabled", "true"); } }