private void btAddParam_Click(object sender, EventArgs e) { var keyValue = new CAWebService.CAdxParamKeyValue(); keyValue.value = "value"; dgKeyValue.DataSource = null; }
private void btAddParam_Click(object sender, EventArgs e) { var keyValue = new CAWebService.CAdxParamKeyValue(); keyValue.key = "Key" + this.parametersDS.Count; keyValue.value = "value"; this.parametersDS.Add(keyValue); dgKeyValue.DataSource = null; dgKeyValue.DataSource = this.parametersDS; }
public override IConfigService GetConfigFromUI() { CAWebService.CAdxParamKeyValue[] objectKeys = null; objectKeys = new CAWebService.CAdxParamKeyValue[this.parametersDS.Count]; this.parametersDS.CopyTo(objectKeys); SOAPConfig conf = new SOAPConfig(); string opStringVal = string.IsNullOrEmpty(cbMode.Text) ? SOAPWebServiceCall.OperationMode.Query.ToString() : cbMode.Text; SOAPWebServiceCall.OperationMode opEnum = SOAPWebServiceCall.OperationMode.Query; if (!Enum.TryParse(opStringVal, out opEnum)) { Console.WriteLine("Enum.Parse(" + opStringVal + ") failed"); } conf.OperatMode = opEnum; conf.HostUrl = tbHost.Text; conf.Path = cbPath.Text; conf.PoolAlias = tbPoolAlias.Text; conf.Language = cbLanguage.Text; conf.PublicName = cbPublicName.Text; int listSize = 10; int.TryParse(cbListSize.Text, out listSize); conf.ListSize = listSize; conf.ObjectKeys = objectKeys; conf.RequestConfiguration = tbRequestConfiguration.Text; conf.XmlFilename = tbXmlFilename.Text; if (string.IsNullOrEmpty(tbXmlFilename.Text)) { conf.XmlObject = tbXmlObject.Text; } // DeleteLines conf.BlocKey = tbBlocKey.Text; conf.LineKeys = this.tbLineKeys.Text.Split(new char[] { ',', ';', ' ' }, StringSplitOptions.RemoveEmptyEntries); conf.Login = tbLogin.Text; conf.Password = tbPassword.Text; return(conf); }