private void btnOK_Click(object sender, EventArgs e) { if (this.textBox3.Text != "") { string text = this.textBox4.Text; string regcode = this.textBox5.Text; if (text == "") { MessageBox.Show("IP地址无效!"); } else { if (regcode == "") { MessageBox.Show("注册码无效!"); } if (this.wpcode == "") { MessageBox.Show("选择的作业点无效!"); } VehIC_WF.CommonService.CommonService service = new VehIC_WF.CommonService.CommonService(); if (!FrmMain.Debug) { service.Url = "http://" + FrmMain.localinfo.ServerUrl + "/VehIC_WS/CommonService.asmx"; } if (!service.WorkPointRegistry(this.wpcode, regcode, text)) { MessageBox.Show("注册失败!请重试!"); } else { MessageBox.Show("注册完毕!等待审核!"); if (!this.sdwefdef) { base.DialogResult = DialogResult.OK; base.Close(); } } } } }