public UcFindAddCondition(ServiceReferenceContentSearch.Condition editCondition) : this() { if (editCondition != null) { this.txtName.Text = editCondition.Name; this.txtValue.Text = editCondition.Value.ToString(); this.radComboBoxOperator.Text = editCondition.Operator.ToString(); this.radComboBoxCondition.Text = editCondition.LogicalCondition.ToString(); } }
private void button1_Click(object sender, EventArgs e) { result = new ServiceReferenceContentSearch.Condition { LogicalCondition = (ServiceReferenceContentSearch.FilterCondition)Enum.Parse(typeof(ServiceReferenceContentSearch.FilterCondition), radComboBoxCondition.Text), Operator = (ServiceReferenceContentSearch.FilterOperator)Enum.Parse(typeof(ServiceReferenceContentSearch.FilterOperator), radComboBoxOperator.Text), Name = txtName.Text, Value = txtValue.Text }; DialogResult = DialogResult.OK; }
private void AddNode(RadTreeNode node, ServiceReferenceContentSearch.Condition condition) { if (node.Nodes.Count > 0) { condition.Conditions = new BindingList <Condition>(); foreach (var item in node.Nodes) { AddNode(item, condition); } } else { //ServiceReferenceContentSearch.Condition cond = new Condition(); //cond = node.DataBoundItem as ServiceReferenceContentSearch.Condition; if (condition.Conditions != null) { condition.Conditions.Add(conditionsDictionary[node]); } } }