private void checkSheet() { if (this.txtName.Text.Length == 0) { XtraMessageBox.Show("请输入姓名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.txtName.Text.IndexOf("_") <= 0) { XtraMessageBox.Show("请输入正确校验码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataProcess dp = new DataProcess(); string result = dp.getResult(this.txtCode.Text.ToString().Trim()); if (result == "-1") { XtraMessageBox.Show("校验码不存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (result == "-2") { XtraMessageBox.Show("没有自检信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { FrmCheckSheet cs = new FrmCheckSheet(result); cs.Show(); } }
private bool GetReport() { bool rtn = false; //string reportFile = System.Windows.Forms.Application.StartupPath + "/report.xlsm"; //string sourceFile = System.Windows.Forms.Application.StartupPath + "/clarity.xls"; string reportFile = "c:/clasp32/data" + "/test.xlsm"; string sourceFile = "c:/clasp32/data" + "/clarity.xls"; string dataFile = System.Windows.Forms.Application.StartupPath + "/data.xml"; string testFile = ConfigurationManager.AppSettings["sourceAddress"]; FileInfo fileInfo = new FileInfo(testFile); SysVar.dtNow = DateTime.Parse(fileInfo.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss")); //有最新文件,开始上传数据 if (DateTime.Compare(SysVar.dtNow, SysVar.dtOld) > 0) { SysVar.dtOld = SysVar.dtNow; DataProcess dp = new DataProcess(reportFile, sourceFile, testFile, dataFile); rtn = dp.uploadInfo(); } else { rtn = false; // XtraMessageBox.Show("测试数据没有生成,请重新测试,如果还是不成功请联系管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); LogHelper.WriteLog("测试数据没有生成,请重新测试,如果还是不成功请联系管理员!"); } return(rtn); }
private void testUpload() { string reportFile = "c:/clasp32/data" + "/test.xlsm"; string sourceFile = "c:/clasp32/data" + "/clarity.xls";; string dataFile = System.Windows.Forms.Application.StartupPath + "/data.xml"; string testFile = ConfigurationManager.AppSettings["sourceAddress"]; DataProcess dp = new DataProcess(reportFile, sourceFile, testFile, dataFile); bool rtn = dp.uploadInfo(); string haha = ""; }
private void simpleButton3_Click(object sender, EventArgs e) { Identity.i_address = null; Identity.i_birth_day = null; Identity.i_code = null; Identity.i_name = null; Identity.i_sex = null; OrderList ol = new OrderList(); if (getICCard()) { //if (true) { DataProcess dp = new DataProcess(); string name = Identity.i_code; //name = "42100319840118001X"; string msg = dp.getInfoByID(name); if (msg.Length == 0) { XtraMessageBox.Show("验证身份证时出错,请重试!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (msg == "-1") { XtraMessageBox.Show("没有未使用的订单!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (msg == "-2") { XtraMessageBox.Show("未找到联系人!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (msg == "-3") { XtraMessageBox.Show("未查询到诊疗师信息或者未绑定门店!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { ol = getOrder(msg); List <OrderData> olist = ol.datas; OrderSelect osFrm = new OrderSelect(olist); if (osFrm.ShowDialog() == DialogResult.OK) { txtCode.Text = osFrm.verifyCode; txtBirthDay.Text = Identity.i_birth_day; txtName.Text = Identity.i_name; txtSex.Text = Identity.i_sex; //txtBirthPlace.Text = getPlace("北京市市辖区朝阳区"); txtBirthPlace.Text = getPlace(Identity.i_address); osFrm.Close(); } } } }
private void simpleButton1_Click(object sender, EventArgs e) { DataProcess dp = new DataProcess(); string result = dp.getResult(Patient.w_code); if (result == "-1") { XtraMessageBox.Show("校验码不存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (result == "-2") { XtraMessageBox.Show("没有自检信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { FrmCheckSheet cs = new FrmCheckSheet(result); cs.TopMost = true; cs.Show(); } }
private bool ValidateInfo() { bool rtn = true; if (this.txtCode.Text.Length == 0) { XtraMessageBox.Show("请输入校验码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); rtn = false; } if (this.txtName.Text.Length == 0) { XtraMessageBox.Show("请输入姓名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); rtn = false; } else if (this.txtSex.SelectedIndex < 0) { XtraMessageBox.Show("请选择性别", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); rtn = false; } else if (this.txtBirthDay.Text.Length == 0) { XtraMessageBox.Show("请输入出生日期", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); rtn = false; } else if (this.txtBirthPlace.Text.Length == 0) { XtraMessageBox.Show("请输入出生地", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); rtn = false; } DataProcess dp = new DataProcess(); string msg = dp.validCode(this.txtCode.Text.Trim()); if (msg.Length > 0) { XtraMessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); rtn = false; } return(rtn); }