/// <summary>
        /// Sets whether or not the Ticket prefix is displayed to the end user. This is determined
        /// by the user's type.
        /// </summary>
        /// <param name="form">The service and support form.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void OnServiceSupportLoad(IUserServiceAndSupport form, EventArgs args)
        {
            IUser user = (IUser)form.CurrentEntity;
            if (user != null)
            {
                form.ctrlstTicketPrefix.Visible = user.Type.Equals(UserType.Remote);
                if (user.Type.Equals(UserType.Remote))
                {
                    form.txtTicketPrefix.Text = user.GetRemoteUserPrefixKey();
                }

                form.chkbxSpeedSearchSubmissions.Enabled = false;
                object useApprovalProcess = MySlx.System.GetBranchOption("UseApprovalProcess");
                if(useApprovalProcess != null)
                    form.chkbxSpeedSearchSubmissions.Enabled = Convert.ToBoolean(useApprovalProcess);

            }
        }
Esempio n. 2
0
        /// <summary>
        /// Sets whether or not the Ticket prefix is displayed to the end user. This is determined
        /// by the user's type.
        /// </summary>
        /// <param name="form">The service and support form.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void OnServiceSupportLoad(IUserServiceAndSupport form, EventArgs args)
        {
            IUser user = (IUser)form.CurrentEntity;

            if (user != null)
            {
                form.ctrlstTicketPrefix.Visible = user.Type.Equals(UserType.Remote);
                if (user.Type.Equals(UserType.Remote))
                {
                    form.txtTicketPrefix.Text = user.GetRemoteUserPrefixKey();
                }

                form.chkbxSpeedSearchSubmissions.Enabled = false;
                object useApprovalProcess = MySlx.System.GetBranchOption("UseApprovalProcess");
                if (useApprovalProcess != null)
                {
                    form.chkbxSpeedSearchSubmissions.Enabled = Convert.ToBoolean(useApprovalProcess);
                }
            }
        }