private void OnCheckChanged(string StoreTo, string ControlAction)//3 { Guid refGuid = new Guid(); if (StoreTo == ActReturnValue.eStoreTo.Variable.ToString()) { GingerCore.General.SelectComboValue(cmbStoreTo, mLabel); if (String.IsNullOrEmpty(this.TextProp) || this.TextProp == DSVE.Text || Guid.TryParse(this.TextProp, out refGuid) == true) { VariableList.SelectedIndex = 0; this.TextProp = VariableList.SelectedItem.ToString(); } else { VariableList.Text = this.TextProp; } } else if (StoreTo == ActReturnValue.eStoreTo.ApplicationModelParameter.ToString()) { GingerCore.General.SelectComboValue(cmbStoreTo, ActReturnValue.eStoreTo.ApplicationModelParameter.ToString()); if (Guid.TryParse(this.TextProp, out refGuid) == false) { xModelsParamsComboBox.SelectedIndex = 0; this.TextProp = ((ComboItem)xModelsParamsComboBox.SelectedItem).Value.ToString(); } else { xModelsParamsComboBox.SelectedValue = this.TextProp; } } else if (StoreTo == ActReturnValue.eStoreTo.DataSource.ToString()) { GingerCore.General.SelectComboValue(cmbStoreTo, ActReturnValue.eStoreTo.DataSource.ToString()); if (String.IsNullOrEmpty(this.TextProp) || this.TextProp == VariableList.Text || Guid.TryParse(this.TextProp, out refGuid) == true) { ActDataSourcePage ADSP = new ActDataSourcePage(DSVE, this.TextProp, ControlAction); ADSP.ShowAsWindow(); this.TextProp = DSVE.Text; } else { DSVE.Text = this.TextProp; } } else if (StoreTo == ActReturnValue.eStoreTo.None.ToString()) { GingerCore.General.SelectComboValue(cmbStoreTo, ActReturnValue.eStoreTo.None.ToString()); this.TextProp = ""; DSVE.Text = ""; VariableList.Text = ""; } chkStoreToValid(); }
private void tviDSTable_MouseDoubleClick(object sender, MouseButtonEventArgs e) { TreeViewItem tvi = (TreeViewItem)e.Source; DataSourceTable dsTable = (DataSourceTable)tvi.DataContext; ActDataSourcePage dsVEPage; string VE = ""; dsVEPage = new ActDataSourcePage(((TreeViewItem)tvi.Parent).Tag.ToString(), dsTable); dsVEPage.ShowAsWindow(); VE = dsVEPage.VE; if (VE != "") { AddExpToValue(VE); } }