예제 #1
0
        /// <summary>
        /// A method for getting the deprovision reason for a deprovision action.
        /// </summary>
        /// <returns>An integer representing the reason: 1 is same model replacement, 2 is different model replacement and 3 is retiring device. 0 means they selected nothing.</returns>
        public static int GetDeprovisionReason()
        {
            DeprovisionSelect window = new DeprovisionSelect();

            window.Title = "Deprovision Reason";
            window.Owner = Application.Current.MainWindow;
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.ShowDialog();
            window.Activate();

            // window has closed
            if (window.sameModelReplacementRadio.IsChecked == true)
            {
                return(1);
            }
            else if (window.differentModelReplacementRadio.IsChecked == true)
            {
                return(2);
            }
            else if (window.retiringDeviceRadio.IsChecked == true)
            {
                return(3);
            }
            else
            {
                return(0);
            }
        }
예제 #2
0
        /// <summary>
        /// A method for getting the deprovision reason for a deprovision action.
        /// </summary>
        /// <returns>An integer representing the reason: 1 is same model replacement, 2 is different model replacement and 3 is retiring device. 0 means they selected nothing.</returns>
        public static int GetDeprovisionReason()
        {
            DeprovisionSelect window = new DeprovisionSelect();

            window.Title = "Deprovision Reason";
            window.ShowDialog();
            window.Activate();

            // window has closed
            if (window.sameModelReplacementRadio.IsChecked == true)
            {
                return(1);
            }
            else if (window.differentModelReplacementRadio.IsChecked == true)
            {
                return(2);
            }
            else if (window.retiringDeviceRadio.IsChecked == true)
            {
                return(3);
            }
            else
            {
                return(0);
            }
        }