Esempio n. 1
0
        private void ChangeFrequency()
        {
            frequencyGroup.Visibility          = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            selectiveFrequencyGroup.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            dxValidationProvider.SetValidationRule(frequencyMeasure, null);
            dxValidationProvider.SetValidationRule(percentOfSelect, null);

            InspectionFrequencyType selectedFrequency = (InspectionFrequencyType)frequencyType.SelectedIndex;

            switch (selectedFrequency)
            {
            case InspectionFrequencyType.R:
                viewModel.PipeTest.Frequency = null;
                break;

            case InspectionFrequencyType.S:
                selectiveFrequencyGroup.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                savedSelectiveRule = CheckCreateNotBlankRule(savedSelectiveRule);
                dxValidationProvider.SetValidationRule(percentOfSelect, savedSelectiveRule);
                break;

            case InspectionFrequencyType.U:
                frequencyGroup.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                if (viewModel.PipeTest.Frequency == null)
                {
                    viewModel.PipeTest.Frequency = new PipeTestFrequency();
                }

                savedRecurringRule = CheckCreateNotBlankRule(savedRecurringRule);
                dxValidationProvider.SetValidationRule(frequencyMeasure, savedRecurringRule);
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
 public PipeTest(string code, string subject, InspectionFrequencyType frequencyType)
     : this()
 {
     this.Code          = code;
     this.FrequencyType = frequencyType;
 }
Esempio n. 3
0
 public PipeTest(string code, string subject, InspectionFrequencyType frequencyType, string expected)
     : this(code, subject, frequencyType)
 {
     this.StringExpected = expected;
 }
Esempio n. 4
0
        //diapasone test

        public PipeTest(string code, string subject, InspectionFrequencyType frequencyType, int min, int max)
            : this(code, subject, frequencyType)
        {
            this.MinExpected = min;
            this.MaxExpected = max;
        }