private void button_datarule_Click(object sender, EventArgs e) { InParams inparams = SDPClient.NewInParams(comboBox_proCode.Text.Trim()); OutParams outparams = SDPClient.NewOutParams(); string proCode = comboBox_proCode.Text.Trim(); inparams.SetServiceName("DataRuleServices"); inparams.SetServiceItem("SaveDataRuleToFile"); inparams.SetRequestBody("TargetProCode", proCode); inparams.SetRequestBody("RuleName", ""); inparams.SetRequestBody("Level", ""); CallService(inparams, outparams); }
private void button_connect_Click(object sender, EventArgs e) { string addr = textBox_serverHost.Text.Trim(); SDPClient.InitComRequest(String.Format("{0}/services/ComRequest", addr)); this.Text = string.Format("远程服务测试 - ({0})", addr); comboBox_proCode.Items.Clear(); try { InParams inparams = SDPClient.NewInParams(null); OutParams outparams = SDPClient.NewOutParams(); inparams.SetServiceName("EnterServices"); inparams.SetServiceItem("GetProjectNames"); if (CallService(inparams, outparams)) { DataTable table = outparams.GetTableParamValue(0); for (int i = 0; i < table.Rows.Count; i++) { DataRow row = table.Rows[i]; comboBox_proCode.Items.Add(table.Rows[i]["F_PROJ_CODE"]); } if (comboBox_proCode.Items.Count > 0) { comboBox_proCode.SelectedIndex = 0; } comboBox_proCode.Items.Add(""); } } catch (Exception ex) { System.Console.Out.WriteLine("初始化项目名称列表失败:{0}", ex); } }