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; } }
public PipeTest(string code, string subject, InspectionFrequencyType frequencyType) : this() { this.Code = code; this.FrequencyType = frequencyType; }
public PipeTest(string code, string subject, InspectionFrequencyType frequencyType, string expected) : this(code, subject, frequencyType) { this.StringExpected = expected; }
//diapasone test public PipeTest(string code, string subject, InspectionFrequencyType frequencyType, int min, int max) : this(code, subject, frequencyType) { this.MinExpected = min; this.MaxExpected = max; }