private bool checkInputValid() { bool isValid = true; if (this.strategyNameTextEdit.Text.Trim().Equals("")) { MessageDxUnit.ShowWarning("Strategy Name can not be empty"); isValid = false; } else if (this.strategyDescTextEdit.Text.Trim().Equals("")) { MessageDxUnit.ShowWarning("Strategy Description can not be empty"); isValid = false; } return(isValid); }
private bool checkDependenceRecordValid() { foreach (KeyValuePair <VariableDependenceRecordKey, VariableDependenceRecord> kv1 in this.variableRelation.DependenceRecordDict) { VariableDependenceRecord record = kv1.Value; String primaryVarialbeStr = kv1.Key.PrimaryVariableKey; String secondaryVariableStr = kv1.Key.SecondaryVariableKey; Variable primaryVariable = this.variables[primaryVarialbeStr]; if (record.ItemDependencDict.Count < primaryVariable.PlatformList.Count) { MessageDxUnit.ShowWarning("The current dependence record has some primary item which doesn't has corresponding secondary item!"); return(false); } } return(true); }
private bool checkPrimaryGridViewValid() { if (this.primaryGridView.DataSource != null) { double sumValue = double.Parse(this.primaryGridView.Columns[1].SummaryItem.SummaryValue.ToString()); if (sumValue > 1) { MessageDxUnit.ShowWarning("The current weight sum is " + sumValue + " and shouldn't larger than 1!"); return(false); } else if (sumValue < 1) { MessageDxUnit.ShowWarning("The current weight sum is " + sumValue + " and shouldn't less than 1!"); return(false); } } return(true); }