/// <summary> /// 获取上次体检数据 /// </summary> /// <param name="userId"></param> /// <param name="user_times"></param> /// <returns></returns> public DataSet GetUprisk(string userId, string user_times) { int timeup = 0; if (user_times == "1" || user_times == "0") { return(null); } else { timeup = Convert.ToInt32(user_times) - 1; } DataSet ds = TmoShare.getDataSetFromXML(riskxml, true); if (ds.Tables[0].Rows.Count == 0) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); } ds.Tables[0].Rows[0]["user_id"] = userId; ds.Tables[0].Rows[0]["user_time"] = timeup.ToString(); string xml = TmoShare.getXMLFromDataSet(ds); string resultxml = TmoLinkServer.TmoServiceClient.InvokeServerMethodT <string>(funCode.GetRiskData, new object[] { xml }); DataSet DsReslut = TmoShare.getDataSetFromXML(resultxml); return(DsReslut); }
public static object GetExpenseDetial(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_pointsManager.Instance.GetExpenseDetial(dt); return(TmoShare.getXMLFromDataSet(dts)); }
public static object GetSellList(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_purchase_sell_stockManager.Instance.GetSellList(dt); return(TmoShare.getXMLFromDataSet(dts)); }
public static object GetRiskData(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_userinfoManager.Instance.GetRiskData(dt); return(TmoShare.getXMLFromDataSet(dts)); }
/// <summary> /// 获取新客户意见 /// </summary> /// <returns></returns> public static object GetNewOpinionData(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_wechat_consultingManager.Instance.GetNewOpinionData(dt); return(TmoShare.getXMLFromDataSet(dts)); }
public static string GetPushlist(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet ds1 = tmo_userinfoManager.Instance.GetPushlist(dt); return(TmoShare.getXMLFromDataSet(ds1)); }
/// <summary> /// 获取新延伸服务信息 /// </summary> /// <returns></returns> public static object GetNewServiceData(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_extend_serviceManager.Instance.GetNewServiceData(dt); return(TmoShare.getXMLFromDataSet(dts)); }
public static string GetMonitorData24(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_monitorManager.Instance.GetMonitorData24(dt); return(TmoShare.getXMLFromDataSet(dts)); }
public static object GetPointsGoodsList(string xml) { DataSet ds = TmoShare.getDataSetFromXML(xml); DataTable dt = ds.Tables[0]; DataSet dts = tmo_points_goodsManager.Instance.GetPointsGoodsList(dt); return(TmoShare.getXMLFromDataSet(dts)); }
public static string GetPageData(string getpagedataEntityParams) { if (string.IsNullOrWhiteSpace(getpagedataEntityParams)) { return(null); } DataSet ds = Tmo_FakeEntityManager.Instance.GetPageData(getpagedataEntityParams); return(TmoShare.getXMLFromDataSet(ds)); }
public static void createReport(string userId) { if (string.IsNullOrWhiteSpace(userId)) { return; } DataSet ds = TmoShare.getDataSetFromXML(riskxml, true); if (ds.Tables[0].Rows.Count == 0) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); } ds.Tables[0].Rows[0]["user_id"] = userId; string riskDxml = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetTimes, new object[] { userId }); DataSet riskState = TmoShare.getDataSetFromXML(riskDxml); if (riskState != null && riskState.Tables.Count > 0 && riskState.Tables[0] != null && riskState.Tables[0].Rows.Count > 0) { if (riskState.Tables[0].Rows[0] != null && riskState.Tables[0].Rows[0]["isrisk"].ToString() == "1") { ds.Tables[0].Rows[0]["user_time"] = riskState.Tables[0].Rows[0]["user_times"]; string selexml = TmoShare.getXMLFromDataSet(ds); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetRiskData, new object[] { selexml }); ds = TmoShare.getDataSetFromXML(strmlx); string c = CreateReport.pphase_Result(ds.Tables[0], ds.Tables[1], "1"); if (c == "1") { DXMessageBox.ShowWarning2("生成评估数据成功,请到输出报告查看!"); } else if (c == "2") { DXMessageBox.ShowWarning2("生成评估数据失败"); } else { DXMessageBox.ShowSuccess("恭喜您,您的身体非常健康\r\n我们暂时无法给你出报告!"); } } else if (riskState.Tables[0].Rows[0] != null && riskState.Tables[0].Rows[0]["isrisk"].ToString() == "2") { DXMessageBox.ShowWarning2("已经评估过!"); } else { DXMessageBox.ShowWarning2("问卷处于暂存状态,请填写完成问卷!"); } } else { DXMessageBox.ShowWarning2("暂时不能评估"); } }
public void GetData() { this.ShowWaitingPanel(() => { try { DsQueryXml = TmoShare.getDataSetFromXML(SubmitXml, true); if (DsQueryXml.Tables[0].Rows.Count == 0) { DsQueryXml.Tables[0].Rows.Add(DsQueryXml.Tables[0].NewRow()); } DsQueryXml.Tables[0].Rows[0]["page_size"] = _pageSize.ToString(); DsQueryXml.Tables[0].Rows[0]["now_page"] = _currentPage.ToString(); DsQueryXml.Tables[0].Rows[0]["user_id"] = _uid; DsQueryXml.Tables[0].Rows[0]["mt_code"] = _dicCode; string dd = nurtype.EditValue.ToString(); string sqlWhere = "and a.mt_time>='" + this.startTime.EditValue + "'" + " and a.mt_time<='" + this.endDate.EditValue + "'"; DsQueryXml.Tables[0].Rows[0]["mt_time"] = sqlWhere; string selexml = TmoShare.getXMLFromDataSet(DsQueryXml); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetMonitorDataBy, new object[] { selexml }); _dsGetDataResult = TmoShare.getDataSetFromXML(strmlx); if (TmoShare.DataSetIsNotEmpty(_dsGetDataResult)) { return(_dsGetDataResult.Tables[1]); } else { return(null); } } catch { } return(null); }, x => { try { var dt = x as DataTable; if (_dicCode != "99") { SetContorl(dt, _dicNamevalue); } else { SetXueYaContorl(dt); } } catch (Exception ex) { } }); }
public static string GetData(object fe_GetDataParam) { var param = fe_GetDataParam as JObject; if (param == null) { return("err_params"); } DataSet ds = Tmo_FakeEntityManager.Instance.GetData(param.ToObject <FE_GetDataParam>()); return(TmoShare.getXMLFromDataSet(ds)); }
public void GetData() { this.ShowWaitingPanel(() => { try { _pageSize = 1; DsQueryXml = TmoShare.getDataSetFromXML(SubmitXml, true); if (DsQueryXml.Tables[0].Rows.Count == 0) { DsQueryXml.Tables[0].Rows.Add(DsQueryXml.Tables[0].NewRow()); } DsQueryXml.Tables[0].Rows[0]["page_size"] = _pageSize.ToString(); DsQueryXml.Tables[0].Rows[0]["now_page"] = _currentPage.ToString(); DsQueryXml.Tables[0].Rows[0]["user_id"] = _uid; DsQueryXml.Tables[0].Rows[0]["mt_code"] = _dicCode; DsQueryXml.Tables[0].Rows[0]["mt_time"] = Convert.ToDateTime(this.dateEdit1.EditValue).ToString("yyyy-MM-dd 00:00:00"); string selexml = TmoShare.getXMLFromDataSet(DsQueryXml); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetMonitorData24, new object[] { selexml }); _dsGetDataResult = TmoShare.getDataSetFromXML(strmlx); if (TmoShare.DataSetIsNotEmpty(_dsGetDataResult)) { DataTable dtCount = _dsGetDataResult.Tables["Count"]; _count = dtCount.Rows[0]["totalRowCount"].ToString(); double countnum = double.Parse(_count) / _pageSize; _pageCount = Math.Ceiling(countnum).ToString(); return(_dsGetDataResult.Tables[1]); } else { return(null); } } catch { } return(null); }, x => { try { var dt = x as DataTable; SetContorl(dt, _dicNamevalue); } catch (Exception ex) { } }); }
/// <summary> /// 获取本次体检数据 /// </summary> /// <returns></returns> public DataSet GetNowRisk(string userId, string user_times) { DataSet ds = TmoShare.getDataSetFromXML(riskxml, true); if (ds.Tables[0].Rows.Count == 0) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); } ds.Tables[0].Rows[0]["user_id"] = userId; ds.Tables[0].Rows[0]["user_time"] = user_times; string xml = TmoShare.getXMLFromDataSet(ds); string resultxml = TmoLinkServer.TmoServiceClient.InvokeServerMethodT <string>(funCode.GetRiskData, new object[] { xml }); DataSet DsReslut = TmoShare.getDataSetFromXML(resultxml); return(DsReslut); }
private int trySendTimes = 3; // 5 * 60 * 1000 / scanInerval; //尝试推送5分钟 private void SendItemData(object obj) { try { DataRow dr = (DataRow)((object[])obj)[1]; string push_type = dr.GetDataRowStringValue("push_type"); string push_id = dr.GetDataRowStringValue("push_id"); string content_type = dr.GetDataRowStringValue("content_type"); string content_title = dr.GetDataRowStringValue("content_title"); string content_value = dr.GetDataRowStringValue("content_value"); string content_url = dr.GetDataRowStringValue("content_url"); string push_address = dr.GetDataRowStringValue("push_address"); string user_code = dr.GetDataRowStringValue("user_code"); string remark = dr.GetDataRowStringValue("remark"); string pushcount = dr.GetDataRowStringValue("push_count"); if (string.IsNullOrWhiteSpace(pushcount)) { pushcount = "1"; } string doc_code = dr.GetDataRowStringValue("doc_code"); if (string.IsNullOrWhiteSpace(push_type)) { return; } PushType pushtype = (PushType)Enum.Parse(typeof(PushType), push_type); string strTxt = string.Format("推送 {0} {1} ...", TmoShare.GetDescription(pushtype), push_address); // SendMessage(strTxt); string emailTitle = content_title; string err_tip = ""; //发送失败提示 int rt_code = -99; //返回错误码 bool send_success = false; //是否发送成功 switch (pushtype) { //发送消息 case PushType.doc_notification: //医生弹窗 //医生编码,内容,用户编码; string[] str = { push_address, content_value, user_code }; send_success = false; // PushInvoke.SendDocInvoke(str, out err_tip); break; case PushType.user_notification: //用户站内信 DataSet notificationDs = TmoShare.getDataSetFromXML(NotificationXML, true); DataRow notificationDr = notificationDs.Tables[0].NewRow(); notificationDr["user_code"] = user_code; notificationDr["title"] = emailTitle; notificationDr["content"] = content_type;//暂时设置为type notificationDr["content_value"] = content_value; notificationDr["remark"] = remark; notificationDs.Tables[0].Rows.Add(notificationDr); notificationDs.AcceptChanges(); send_success = PushInvoke.SendMsg(notificationDs, out err_tip); break; //发送短信 case PushType.doc_sms: case PushType.user_sms: DataSet smsDS = TmoShare.getDataSetFromXML(SMSXml); DataRow smsdr = smsDS.Tables[0].Rows[0]; smsdr["user_code"] = user_code; smsdr["mobile"] = push_address; smsdr["message"] = content_value; smsdr["type"] = "1"; smsdr["doc_code"] = doc_code; send_success = PushInvoke.SendSMS(TmoShare.getXMLFromDataSet(smsDS), out err_tip, out rt_code); break; //发送微信 case PushType.doc_wechat: case PushType.user_wechat: send_success = PushInvoke.SendWeChat(new object[] { "admin", push_address, content_type, content_value }, out err_tip); break; //发送电子邮件 case PushType.doc_mail: case PushType.user_mail: var emailDS = TmoShare.getDataSetFromXML(EmailXml); DataRow emaildr = emailDS.Tables[0].Rows[0]; emaildr["user_code"] = user_code; emaildr["sendaccount"] = "健康干预"; emaildr["sendToaccount"] = push_address; emaildr["sendcontent"] = content_value; emaildr["sendtitle"] = emailTitle; emaildr["sendtype"] = "1"; emaildr["doc_code"] = doc_code; send_success = PushInvoke.SendEmail(TmoShare.getXMLFromDataSet(emailDS), out err_tip); break; } if (send_success) { tmo_push_listManager.Instance.Delete(push_id, trySendTimes, true); if (remark == "weMonitor") //来自设备监测数据 { tmo_monitorManager.Instance.UpdateWXState(push_id); } else { tmo_interveneManager.Instance.SetInterveneSuccess(push_id); } strTxt += "成功"; } else if (pushtype == PushType.doc_notification) { } //医生弹窗排除 else if (err_tip == "err_wx_time_limit") { } //系统限制微信消息回复 排除 else { //非真实删除 而是按失败处理 重试次数加1 if (rt_code == -99 || rt_code == -11 || rt_code == -20) { bool isTrue = err_tip.Contains("err_43004"); //取消关注公众号不再重试 tmo_push_listManager.Instance.Delete(push_id, trySendTimes, isTrue); } else //剩下的错误无需重试 { tmo_push_listManager.Instance.Delete(push_id, 1, true); } if (remark == "weMonitor") //来自设备监测数据 { tmo_monitorManager.Instance.UpdateWXState(push_id, 4); //推送失败 } else { tmo_interveneManager.Instance.SetInterveneFailed(push_id, string.Format("失败:{1} 重试{0}次", pushcount, err_tip)); } strTxt += $"失败:{rt_code} {err_tip} (重试{pushcount}次)"; LogHelper.Log.Fatal($"{pushtype}第{pushcount}次发送失败!=>{rt_code} {err_tip}"); } SendMessage(strTxt); } catch (Exception ex) { SendMessage(ex.Message); } finally { ((ManualResetEvent)((object[])obj)[0]).Set(); //将事件状态设置为终止 } }
public static string GetdocInfo(string id) { DataSet ds = tmo_userinfoManager.Instance.GetdocInfo(id); return(TmoShare.getXMLFromDataSet(ds)); }
public static object LoadAuoutUs(string fieldname, string hos_code) { DataSet dts = tmo_web_configManager.Instance.LoadAuoutUs(fieldname, hos_code); return(TmoShare.getXMLFromDataSet(dts)); }
/// <summary> /// 获取客户意见 /// </summary> /// <returns></returns> public static object Getdis_dic() { DataSet dts = tmo_disdicManager.Instance.GetData(); return(TmoShare.getXMLFromDataSet(dts)); }
/// <summary> /// 生成解决方案 /// </summary> /// <param name="user_idd"></param> /// <param name="user_timesd"></param> void ShengPro(string user_idd, string user_timesd) { this.ShowWaitingPanel(() => { try { List <string> disnames = new List <string>(); List <string> project_ids = new List <string>(); DataSet inputProds = TmoShare.getDataSetFromXML(proxml); if (inputProds != null && inputProds.Tables.Count > 0 && inputProds.Tables[0] != null) { inputProds.Tables[0].Rows.Clear(); } string resxml = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetRiskResult, new object[] { user_idd, user_timesd }); DataSet ds = TmoShare.getDataSetFromXML(resxml); if (TmoShare.DataSetIsEmpty(ds)) { return("2"); } else { foreach (DataRow disanem in ds.Tables[0].Rows) { disnames.Add(disanem["moment_type"].ToString()); } } string resxmlprodic = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetProjectDic, new object[] { "", "", "" }); DataSet dsprodic = TmoShare.getDataSetFromXML(resxmlprodic); if (TmoShare.DataSetIsEmpty(dsprodic)) { return("2"); } else { foreach (string disname in disnames) { var disnamenew = disname; if (disname == "肾病五期") //糖尿病Ⅲ期肾病,糖尿病Ⅳ期肾病,糖尿病Ⅴ期肾病 { disnamenew = "糖尿病Ⅴ期肾病"; } if (disname == "肾病四期") { disnamenew = "糖尿病Ⅳ期肾病"; } if (disname == "肾病三期") { disnamenew = "糖尿病Ⅲ期肾病"; } if (disname == "视网膜病变背景期") { disnamenew = "糖尿病视网膜病变背景期"; } if (disname == "糖尿病周围神经病变及自主神经病变") { disnamenew = "糖尿病神经病变"; } foreach (DataRow row in dsprodic.Tables[0].Rows) { string[] dicstrs = row["disease_name"].ToString().Split(','); string project_id = row["project_id"].ToString(); if (project_ids.Contains(project_id)) { continue; } if (dicstrs.Contains(disnamenew)) { project_ids.Add(project_id); DataRow newdr = inputProds.Tables[0].NewRow(); newdr["user_id"] = user_idd; newdr["user_times"] = user_timesd; newdr["project_type"] = row["project_type"]; newdr["project_name"] = row["project_name"]; newdr["solve_content"] = row["solve_content"]; inputProds.Tables[0].Rows.Add(newdr); } } } project_ids.Clear(); string inputproxml = TmoShare.getXMLFromDataSet(inputProds); bool isuc = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.InProResult, new object[] { inputproxml }); if (isuc) { return("1"); } else { return("2"); } } } catch (Exception) { return("2"); } }, x => { try { if (x.ToString() == "1") { DXMessageBox.Show("生成解决方案成功!", true); GetData(); } else { DXMessageBox.ShowWarning2("生成方案失败!请重试!"); } } catch (Exception ex) { LogHelper.Log.Error("实体加载数据出错", ex); DXMessageBox.ShowWarning2("数据加载失败!请重试!"); } }); }
void btnRisk_Click(object sender, EventArgs e) { if (CheckedRowIndexs.Count == 0) { return; } DataRow dr = gridView1.GetDataRow(CheckedRowIndexs[0]); if (dr != null && dr["isrisk"] != null) { if (dr["isrisk"].ToString() == "已评估") { DXMessageBox.ShowWarning2("已经评估过!"); return; } else if (dr["isrisk"].ToString() == "暂存") { DXMessageBox.ShowWarning2("问卷处于暂存状态,请填写完成问卷!"); return; } } else { return; } DataSet ds = TmoShare.getDataSetFromXML(riskxml, true); if (ds.Tables[0].Rows.Count == 0) { ds.Tables[0].Rows.Add(ds.Tables[0].NewRow()); } ds.Tables[0].Rows[0]["user_id"] = dr["user_id"]; string riskDxml = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetTimes, new object[] { dr["user_id"].ToString() }); DataSet riskState = TmoShare.getDataSetFromXML(riskDxml); if (riskState != null && riskState.Tables.Count > 0 && riskState.Tables[0] != null && riskState.Tables[0].Rows.Count > 0) { if (riskState.Tables[0].Rows[0] != null && riskState.Tables[0].Rows[0]["isrisk"].ToString() == "1") { ds.Tables[0].Rows[0]["user_time"] = riskState.Tables[0].Rows[0]["user_times"]; string selexml = TmoShare.getXMLFromDataSet(ds); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetRiskData, new object[] { selexml }); ds = TmoShare.getDataSetFromXML(strmlx); string c = CreateReport.pphase_Result(ds.Tables[0], ds.Tables[1], "1"); if (c == "1") { DXMessageBox.ShowWarning2("生成评估数据成功"); GetData(); } else if (c == "2") { DXMessageBox.ShowWarning2("生成评估数据失败"); } else { DXMessageBox.ShowSuccess("恭喜您,您的身体非常健康\r\n我们暂时无法给你出报告!"); } } else if (riskState.Tables[0].Rows[0] != null && riskState.Tables[0].Rows[0]["isrisk"].ToString() == "2") { DXMessageBox.ShowWarning2("已经评估过!"); } else { DXMessageBox.ShowWarning2("问卷处于暂存状态,请填写完成问卷!"); } } else { DXMessageBox.ShowWarning2("暂时不能评估"); } }
void btnAdd_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(isadd)) { string protype = cmproType.SelectedText; protype = cmproType.Text; string projectName = txtTypeName.Text; if (string.IsNullOrEmpty(projectName)) { DXMessageBox.ShowWarning2("请输入解决方案名称"); return; } string projectanswer = typeAnswer.Text; string dis = SetDis(); if (string.IsNullOrEmpty(dis)) { DXMessageBox.ShowWarning2("请选择对应的疾病类型"); return; } DataSet ds = TmoShare.getDataSetFromXML(disxml); ds.Tables[0].Rows.Clear(); DataRow dr = ds.Tables[0].NewRow(); dr["project_name"] = projectName; dr["solve_content"] = projectanswer; dr["disease_name"] = dis; dr["project_type"] = protype; ds.Tables[0].Rows.InsertAt(dr, 0); bool blt = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.AddProject, new object[] { TmoShare.getXMLFromDataSet(ds) }); if (blt) { DXMessageBox.ShowWarning2("添加项目成功"); Clear(); } else { DXMessageBox.ShowWarning2("添加项目失败"); } } else { string protype = cmproType.SelectedText; protype = cmproType.Text; string projectName = txtTypeName.Text; if (string.IsNullOrEmpty(projectName)) { DXMessageBox.ShowWarning2("请输入解决方案名称"); return; } string projectanswer = typeAnswer.Text; string dis = SetDis(); if (string.IsNullOrEmpty(dis)) { DXMessageBox.ShowWarning2("请选择对应的疾病类型"); return; } DataSet ds = TmoShare.getDataSetFromXML(disxml); ds.Tables[0].Rows.Clear();//isadd DataRow dr = ds.Tables[0].NewRow(); dr["project_name"] = projectName; dr["solve_content"] = projectanswer; dr["disease_name"] = dis; dr["project_type"] = protype; dr["project_id"] = isadd; ds.Tables[0].Rows.InsertAt(dr, 0); bool blt = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.AddProject, new object[] { TmoShare.getXMLFromDataSet(ds) }); if (blt) { DXMessageBox.ShowWarning2("修改项目成功!"); Clear(); } else { DXMessageBox.ShowWarning2("修改项目失败!"); } } }
/// <summary> /// 加载数据 /// </summary> public void GetData() { this.ShowWaitingPanel(() => { try { _dsQueryXml = TmoShare.getDataSetFromXML(SubmitXml, true); if (_dsQueryXml.Tables[0].Rows.Count == 0) { _dsQueryXml.Tables[0].Rows.Add(_dsQueryXml.Tables[0].NewRow()); } _dsQueryXml.Tables[0].Rows[0]["doc_code"] = TmoComm.login_docInfo.children_docid; _dsQueryXml.Tables[0].Rows[0]["page_size"] = _pageSize.ToString(); _dsQueryXml.Tables[0].Rows[0]["now_page"] = _currentPage.ToString(); if (!string.IsNullOrEmpty(this.user_codetxt.Text)) { _dsQueryXml.Tables[0].Rows[0]["user_id"] = this.user_codetxt.Text; } if (!string.IsNullOrEmpty(this.user_timestxt.Text)) { _dsQueryXml.Tables[0].Rows[0]["user_times"] = this.user_timestxt.Text; } if (!string.IsNullOrEmpty(this.user_nametxt.Text)) { _dsQueryXml.Tables[0].Rows[0]["name"] = this.user_nametxt.Text; } string gender = cmgender.EditValue.ToString(); if (gender == "男") { _dsQueryXml.Tables[0].Rows[0]["gender"] = "1"; } if (gender == "女") { _dsQueryXml.Tables[0].Rows[0]["gender"] = "2"; } if (birchb.Checked) { _dsQueryXml.Tables[0].Rows[0]["birth_date_begin"] = birth_datestart.EditValue.ToString(); _dsQueryXml.Tables[0].Rows[0]["birth_date_end"] = birth_dateend.EditValue.ToString(); } if (checkEdit2.Checked) { _dsQueryXml.Tables[0].Rows[0]["reg_time_begin"] = exam_timestart.EditValue.ToString(); _dsQueryXml.Tables[0].Rows[0]["reg_time_end"] = exam_timeend.EditValue.ToString(); } string selexml = TmoShare.getXMLFromDataSet(_dsQueryXml); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetNewReportData, new object[] { selexml }); _dsGetDataResult = TmoShare.getDataSetFromXML(strmlx); if (TmoShare.DataSetIsNotEmpty(_dsGetDataResult)) { DataTable dtCount = _dsGetDataResult.Tables["Count"]; count = dtCount.Rows[0]["totalRowCount"].ToString(); double countnum = double.Parse(count) / _pageSize; pageCount = Math.Ceiling(countnum).ToString(); return(_dsGetDataResult.Tables[1]); } else { return(null); } } catch { } return(null); }, x => { try { DataTable dt = x as DataTable; if (dt == null) { return; } dt.Columns.Add("wei", typeof(string)); dt.Columns.Add("lookluru", typeof(string)); dt.Columns.Add("luru", typeof(string)); foreach (DataRow row in dt.Rows) { row["look_report"] = "维护"; row["wei"] = "推荐维护"; row["lookluru"] = "查看录入指标"; row["luru"] = "录入指标"; } dgcTree.DataSource = dt; if (gridView1.GroupCount > 0) { gridView1.ExpandAllGroups(); } gridView1.MoveFirst(); lblCount.Text = string.Format("共[{0}]条", count); lblPageIndex.Text = string.Format("第[{0}]页,共[{1}]页", _currentPage.ToString(), _pageSize.ToString()); txtPageIndex.Text = _currentPage.ToString(); txtPageSize.Text = _pageSize.ToString(); llblUp.Enabled = _currentPage > 1; llblDown.Enabled = _currentPage < int.Parse(pageCount); } catch (Exception ex) { LogHelper.Log.Error("实体加载数据出错", ex); DXMessageBox.ShowWarning2("数据加载失败!请重试!"); } }); }
void btnAdd_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(isadd)) { string videoUrl = txtvideoUrl.Text; if (string.IsNullOrEmpty(videoUrl)) { DXMessageBox.ShowWarning2("请输入视频路径"); return; } string videoName = txtvideoName.Text; if (string.IsNullOrEmpty(videoName)) { DXMessageBox.ShowWarning2("请输入视频名称"); return; } DataSet ds = TmoShare.getDataSetFromXML(disxml); ds.Tables[0].Rows.Clear(); DataRow dr = ds.Tables[0].NewRow(); dr["video_name"] = videoName; dr["video_url"] = videoUrl; ds.Tables[0].Rows.InsertAt(dr, 0); bool blt = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.AddVideo, new object[] { TmoShare.getXMLFromDataSet(ds) }); if (blt) { DXMessageBox.ShowWarning2("添加项目成功"); } else { DXMessageBox.ShowWarning2("添加项目失败"); } } else { string videoUrl = txtvideoUrl.Text; if (string.IsNullOrEmpty(videoUrl)) { DXMessageBox.ShowWarning2("请输入视频路径"); return; } string videoName = txtvideoName.Text; if (string.IsNullOrEmpty(videoName)) { DXMessageBox.ShowWarning2("请输入视频名称"); return; } DataSet ds = TmoShare.getDataSetFromXML(disxml); ds.Tables[0].Rows.Clear();//isadd DataRow dr = ds.Tables[0].NewRow(); dr["video_name"] = videoName; dr["video_url"] = videoUrl; dr["id"] = isadd; ds.Tables[0].Rows.InsertAt(dr, 0); bool blt = (bool)TmoServiceClient.InvokeServerMethodT <bool>(funCode.UpdateVideo, new object[] { TmoShare.getXMLFromDataSet(ds) }); if (blt) { DXMessageBox.ShowWarning2("修改项目成功!"); } else { DXMessageBox.ShowWarning2("修改项目失败!"); } } }
private void btnAdd_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(user_id.Text)) { DXMessageBox.ShowWarning2("证件号不能为空!"); return; } bool idCard = Convert.ToBoolean(TmoServiceClient.InvokeServerMethodT <bool>(funCode.CheckIDCard, user_id.Text)); if (idCard) { DXMessageBox.ShowWarning2("用户ID不存在!"); return; } if (string.IsNullOrWhiteSpace(diary_date.Text)) { DXMessageBox.ShowWarning2("日期不能为空!"); return; } string result = "-2"; string data = diary_date.Text; DataSet ds = TmoShare.getDataSetFromXML(xmlPharmacyDiary, true); DataRow dr = ds.Tables[0].NewRow(); try { foreach (DevExpress.XtraEditors.PanelControl temp in this.Controls) { foreach (Control det in temp.Controls) { foreach (DataColumn dc in ds.Tables[0].Columns) { if (det.Name == dc.ColumnName) { if (det.GetType().ToString() == "DevExpress.XtraEditors.CheckEdit") { dr[dc] = ((DevExpress.XtraEditors.CheckEdit)det).Checked ? 1 : 2; } else { dr[dc] = det.Text; } } } } } } catch { DXMessageBox.ShowError("用药记录失败!", this); } ds.Tables[0].Rows.Add(dr); ds.AcceptChanges(); TmoServiceClient.InvokeServerMethodT <string>(funCode.CreatePointsUser, user_id.Text); result = TmoServiceClient.InvokeServerMethodT <string>(funCode.AddPharmacyRecord, TmoShare.getXMLFromDataSet(ds)); if (Convert.ToInt16(result) >= 0) { DXMessageBox.Show("用药记录成功!", true); if (this.ParentForm != null) { this.ParentForm.DialogResult = DialogResult.OK; this.ParentForm.Close(); } } else { DXMessageBox.ShowError("用药记录失败!", this); } }
public dynamic Main([FromBody] FuncMainParam param) { funCode funCode = param.FunCode; string checkData = param.CheckData; string checkKey = param.CheckKey; object[] funParams = param.FunParams; //默认返回码 dynamic returnObj = "err_Unkonwn"; //未知错误 bool invokeSuccess = true; Stopwatch stopwatch = Stopwatch.StartNew(); try { #region 加密狗验证 #endregion #region 客户端校验 #endregion #region 处理不同的方法请求 switch (funCode) { case funCode.CheckLink: //连接检查 returnObj = FunctionClass.CheckLink(); break; case funCode.CheckIDCard: string IdCardxml = funParams[0].ToString(); returnObj = FunctionClass.CheckIDCard(IdCardxml); break; case funCode.GetPersonData: string Personxml = funParams[0].ToString(); returnObj = FunctionClass.GetPersonData(Personxml); break; case funCode.GetGetNewPersonData: returnObj = FunctionClass.GetGetNewPersonData(funParams[0].ToString()); break; case funCode.RiskNewReport: returnObj = FunctionClass.RiskNewReport(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.RiskSaveMedical: returnObj = FunctionClass.RiskSaveMedical(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.GetNewReportData: returnObj = FunctionClass.GetNewReportData(funParams[0].ToString()); break; case funCode.GetRiskData: string riskxml = funParams[0].ToString(); returnObj = FunctionClass.GetRiskData(riskxml); break; case funCode.RiskMedical: string Riskxml = funParams[0].ToString(); returnObj = FunctionClass.RiskMedical(Riskxml); break; case funCode.GetIds: returnObj = FunctionClass.GetIds(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.GetTimes: string user_id = funParams[0].ToString(); returnObj = FunctionClass.GetTimes(user_id); break; case funCode.updateRisk: string user_ids = funParams[0].ToString(); string user_times = funParams[1].ToString(); returnObj = FunctionClass.updateRisk(user_ids, user_times); break; case funCode.GetReportData: string Pxml = funParams[0].ToString(); returnObj = FunctionClass.GetReportData(Pxml); break; case funCode.GetRiskResult: returnObj = FunctionClass.GetRiskResult(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.InsertAttach: returnObj = FunctionClass.InsertAttach(Convert.FromBase64String(funParams[0].ToString()), funParams[1].ToString(), funParams[2].ToString(), funParams[3].ToString()); break; case funCode.GetAttach: returnObj = FunctionClass.GetAttach(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.UpdateAttach: returnObj = FunctionClass.UpdateAttch(funParams[0].ToString(), Convert.FromBase64String(funParams[1].ToString()), funParams[2].ToString()); break; case funCode.DelAttach: returnObj = FunctionClass.DelAttach(funParams[0].ToString(), funParams[1].ToString()); break; #region 实体相关 case funCode.FakeEntity_GetTableStruct: returnObj = FunctionClass.GetTableStruct(funParams[0].ToString()); break; case funCode.FakeEntity_GetData: returnObj = FunctionClass.GetData(funParams[0].ToString()); break; case funCode.FakeEntity_GetDataNew: returnObj = FunctionClass.GetData(funParams[0]); break; case funCode.FakeEntity_SubmitData: returnObj = FunctionClass.SubmitData(funParams[0].ToString()); break; case funCode.FakeEntity_SubmitDataNew: returnObj = FunctionClass.SubmitData(funParams[0]); break; case funCode.FakeEntity_GetPageData: returnObj = FunctionClass.GetPageData(funParams[0].ToString()); break; case funCode.FakeEntity_ExistSameValue: returnObj = FunctionClass.ExistSameValue(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString(), funParams[3], bool.Parse(funParams[4].ToString())); break; case funCode.FakeEntity_DeleteData: returnObj = FunctionClass.DelData(funParams); break; #endregion #region 新版问卷 case funCode.GetFistQuestionnaires: returnObj = FunctionClass.GetFistQuestionnaires(funParams); break; case funCode.GetQuestionnaires: returnObj = FunctionClass.GetQuestionnaires(funParams); break; case funCode.SaveQuestionnaires: returnObj = FunctionClass.SaveQuestionnaires(funParams); break; case funCode.SubmitQuestionnaires: returnObj = FunctionClass.SubmitQuestionnaires(funParams); break; case funCode.DeleteQuestionnaires: returnObj = FunctionClass.DeleteQuestionnaires(funParams); break; #endregion #region 推荐列表 case funCode.TuijianZhi: returnObj = FunctionClass.InputDicUser(funParams[0].ToString()); break; case funCode.TuijianUpdate: returnObj = FunctionClass.UpdateDicUser(funParams[0].ToString()); break; case funCode.getTuiData: returnObj = FunctionClass.getTuiData(); break; case funCode.GettuiDataUser: returnObj = FunctionClass.GetDataUser(funParams[0].ToString(), funParams[1].ToString()); break; #endregion case funCode.AddQuestionnaire: string quesxml = funParams[0].ToString(); returnObj = FunctionClass.AddQuestionnaire(quesxml); break; case funCode.UpdateQuestionnaire: string quesupxml = funParams[0].ToString(); returnObj = FunctionClass.UpdateQuestionnaire(quesupxml); break; case funCode.DeleteQuestionnaire: string userId = funParams[0].ToString(); string userTimes = funParams[1].ToString(); returnObj = FunctionClass.DeleteQuestionnaire(userId, userTimes); break; case funCode.SelectQuestionnaire: string quesUserID = funParams[0].ToString(); string times = funParams[1].ToString(); returnObj = FunctionClass.SelectQuestionnaire(quesUserID, times); break; case funCode.SelectLookQuestionnaire: string quesUserID1 = funParams[0].ToString(); string times1 = funParams[1].ToString(); returnObj = FunctionClass.SelectLookQuestionnaire(quesUserID1, times1); break; case funCode.SelectLastQues: string identity = funParams[0].ToString(); returnObj = FunctionClass.SelectLastQues(identity); break; case funCode.SelectUserinfo: string userID = funParams[0].ToString(); returnObj = FunctionClass.SelectUserinfo(userID); break; case funCode.GetDeviceValue: string dic = funParams[0].ToString(); string identitys = funParams[1].ToString(); returnObj = FunctionClass.GetDeviceValue(dic, identitys); break; case funCode.GetPublicList: string tableName = funParams[0].ToString(); string condition = funParams[1].ToString(); returnObj = FunctionClass.GetPublicList(tableName, condition); break; case funCode.GetRiskFiveData: string user_ID = funParams[0].ToString(); returnObj = FunctionClass.GetRiskFiveData(user_ID); break; case funCode.GetNewFiveData: returnObj = FunctionClass.GetNewFiveData(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.GetImetData: returnObj = FunctionClass.GetImetData(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.SaveReportUP: string bloodreason = funParams[0].ToString(); string bloodadvice = funParams[1].ToString(); string pressurereason = funParams[2].ToString(); string pressureadvice = funParams[3].ToString(); string user_iD = funParams[4].ToString(); string user_Times = funParams[5].ToString(); string bloodlipid_reason = funParams[6].ToString(); string bloodlipid_advice = funParams[7].ToString(); string zhuanjia = funParams[8].ToString(); returnObj = FunctionClass.SaveReportUP(user_iD, user_Times, bloodreason, bloodadvice, pressurereason, pressureadvice, bloodlipid_reason, bloodlipid_advice, zhuanjia, funParams[9].ToString(), funParams[10].ToString(), funParams[11].ToString(), funParams[12].ToString(), funParams[13].ToString(), funParams[14].ToString(), funParams[15].ToString(), funParams[16].ToString(), funParams[17].ToString(), funParams[18].ToString()); break; case funCode.GetMainData: returnObj = FunctionClass.GetMainData(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.SaveReportUPdate: string service_id = funParams[0].ToString(); string bloodreasonu = funParams[1].ToString(); string bloodadviceu = funParams[2].ToString(); string pressurereasonu = funParams[3].ToString(); string pressureadviceu = funParams[4].ToString(); string bloodlipid_reason1 = funParams[7].ToString(); string bloodlipid_advice2 = funParams[8].ToString(); string azhuanjia = funParams[9].ToString(); returnObj = FunctionClass.SaveReportUPdate(service_id, funParams[5].ToString(), funParams[6].ToString(), bloodreasonu, bloodadviceu, pressurereasonu, pressureadviceu, bloodlipid_reason1, bloodlipid_advice2, azhuanjia, funParams[10].ToString(), funParams[11].ToString(), funParams[12].ToString(), funParams[13].ToString(), funParams[14].ToString(), funParams[15].ToString(), funParams[16].ToString(), funParams[17].ToString(), funParams[18].ToString(), funParams[19].ToString()); break; case funCode.ReportDel: returnObj = FunctionClass.ReportDel(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.ReportDelNew: returnObj = FunctionClass.ReportDelNew(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.GetProType: returnObj = FunctionClass.GetProType(); break; case funCode.AddProject: string xmlData = funParams[0].ToString(); returnObj = FunctionClass.AddProject(xmlData); break; case funCode.UpdateVideo: returnObj = FunctionClass.UpdateVideo(funParams[0].ToString()); break; case funCode.delVideoid: returnObj = FunctionClass.DelVideo(funParams[0].ToString()); break; case funCode.AddVideo: returnObj = FunctionClass.AddVideo(funParams[0].ToString()); break; case funCode.GetProjectDic: string projecttype = funParams[0].ToString(); string project = funParams[1].ToString(); returnObj = FunctionClass.GetProjectDic(projecttype, project, funParams[2].ToString()); break; case funCode.GeVideoList: string videName = funParams[0].ToString(); returnObj = FunctionClass.GeVideoList(videName); break; case funCode.GetVideoId: string videoID = funParams[0].ToString(); returnObj = FunctionClass.GetVideoId(videoID); break; case funCode.InProResult: string inputproxml = funParams[0].ToString(); returnObj = FunctionClass.InProResult(inputproxml); break; case funCode.GetProResult: returnObj = FunctionClass.GetProResult(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.unpdtePersonPro: returnObj = FunctionClass.unpdtePersonPro(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.updateAll: returnObj = FunctionClass.unpdteProAll(funParams[0].ToString()); break; case funCode.DelPerProre: returnObj = FunctionClass.DelPerProre(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.GetNextID: returnObj = FunctionClass.GetNextID(funParams); break; case funCode.CheckDocAuth: returnObj = FunctionClass.CheckDocAuth(funParams); break; case funCode.GetServiceData: string Servicexml = funParams[0].ToString(); returnObj = FunctionClass.GetServiceData(Servicexml); break; case funCode.UpdatePayType: string payxml = funParams[0].ToString(); returnObj = FunctionClass.UpdatePayType(payxml); break; case funCode.BackService: string user_id1 = funParams[0].ToString(); string user_time1 = funParams[1].ToString(); returnObj = FunctionClass.BackService(user_id1, user_time1); break; case funCode.GetNewServiceData: string Servicexmlnew = funParams[0].ToString(); returnObj = FunctionClass.GetNewServiceData(Servicexmlnew); break; case funCode.UpdateNewPayType: string payxmlnew = funParams[0].ToString(); returnObj = FunctionClass.UpdateNewPayType(payxmlnew); break; case funCode.NewBackService: string user_idnew = funParams[0].ToString(); string user_timenew = funParams[1].ToString(); returnObj = FunctionClass.NewBackService(user_idnew, user_timenew); break; case funCode.AddMonitorData: returnObj = FunctionClass.AddMonitorData(funParams); break; case funCode.GetProjectData: string Pxmls = funParams[0].ToString(); returnObj = FunctionClass.GetProjectData(Pxmls); break; case funCode.GetProjectDataPerson: returnObj = FunctionClass.GetProjectDataPerson(funParams[0].ToString()); break; case funCode.GetMonitorData: string id = funParams[0].ToString(); returnObj = FunctionClass.GetMonitorData(id); break; case funCode.GetMonitorDataBy: returnObj = FunctionClass.GetMonitorDataBy(funParams[0].ToString()); break; case funCode.GetMonitorData24: returnObj = FunctionClass.GetMonitorData24(funParams[0].ToString()); break; case funCode.GetItemData: returnObj = FunctionClass.GetItemData(); break; case funCode.GetItemDataShow: string Itemxml = funParams[0].ToString(); returnObj = FunctionClass.GetItemDataShow(Itemxml); break; case funCode.DelProject: returnObj = FunctionClass.DelProject(funParams[0].ToString()); break; case funCode.GetOpinionData: string xml = funParams[0].ToString(); returnObj = FunctionClass.GetOpinionData(xml); break; case funCode.GetNewOpinionData: string xmlnew = funParams[0].ToString(); returnObj = FunctionClass.GetNewOpinionData(xmlnew); break; case funCode.UpdateOpinion: string adviseID = funParams[0].ToString(); string askContent = funParams[1].ToString(); string docCode = funParams[2].ToString(); returnObj = FunctionClass.UpdateOpinion(adviseID, askContent, docCode); break; case funCode.AddReply: string con_id = funParams[0].ToString(); string reply_content = funParams[1].ToString(); string doc_id = funParams[2].ToString(); returnObj = FunctionClass.AddReply(con_id, reply_content, doc_id); break; case funCode.AddAsk: string dsxmlask = funParams[0].ToString(); returnObj = FunctionClass.AddAsk(dsxmlask); break; case funCode.OptionalAdd: string dsxml = funParams[0].ToString(); returnObj = FunctionClass.OptionalAdd(dsxml); break; case funCode.OptionalUpdate: string dsxmlou = funParams[0].ToString(); returnObj = FunctionClass.OptionalUpdate(dsxmlou); break; case funCode.OptionalDelete: string dsxmlod = funParams[0].ToString(); returnObj = FunctionClass.OptionalDelete(dsxmlod); break; case funCode.OptionalSelect: string dsxmlos = funParams[0].ToString(); returnObj = TmoShare.getXMLFromDataSet(FunctionClass.OptionalSelect(dsxmlos)); break; case funCode.GetArticleData: string Servicexmls = funParams[0].ToString(); returnObj = FunctionClass.GetArticleData(Servicexmls); break; case funCode.AddOrUpdateAboutUs: string doc_code = funParams[0].ToString(); string hos_code = funParams[1].ToString(); string aboutxmls = funParams[2].ToString(); returnObj = FunctionClass.AddOrUpdateAboutUs(doc_code, hos_code, aboutxmls); break; case funCode.LoadAuoutUs: string fieldname = funParams[0].ToString(); string hos_codes = funParams[1].ToString(); returnObj = FunctionClass.LoadAuoutUs(fieldname, hos_codes); break; case funCode.Getdis_dic: returnObj = FunctionClass.Getdis_dic(); break; case funCode.GetStockList: string stockxmls = funParams[0].ToString(); returnObj = FunctionClass.GetStockList(stockxmls); break; case funCode.GetPurchasesList: string purchasesxmls = funParams[0].ToString(); returnObj = FunctionClass.GetPurchasesList(purchasesxmls); break; case funCode.GetSellList: string sellxmls = funParams[0].ToString(); returnObj = FunctionClass.GetSellList(sellxmls); break; case funCode.AddSell: string sellxmlss = funParams[0].ToString(); returnObj = FunctionClass.AddSell(sellxmlss); break; case funCode.AddPurchase: string purchasexml = funParams[0].ToString(); returnObj = FunctionClass.AddPurchase(purchasexml); break; case funCode.AddProduct: string productxml = funParams[0].ToString(); returnObj = FunctionClass.AddProduct(productxml); break; case funCode.DeleteProduct: string productID = funParams[0].ToString(); returnObj = FunctionClass.DeleteProduct(productID); break; case funCode.AddPushList: returnObj = FunctionClass.AddPushList(funParams[0].ToString()); break; case funCode.AddIntervene: returnObj = FunctionClass.AddIntervene(funParams); break; case funCode.UpdateState: string name = funParams[0].ToString(); string state = funParams[1].ToString(); string sellID = funParams[2].ToString(); returnObj = FunctionClass.UpdateState(name, state, sellID); break; case funCode.GetnurtypeItem: returnObj = FunctionClass.GetnurtypeItem(); break; case funCode.GetHotDic: returnObj = FunctionClass.GetHotDic(); break; case funCode.GetNurData: string nurparentId = funParams[0].ToString(); string nurhotId = funParams[1].ToString(); returnObj = FunctionClass.GetNurData(nurparentId, nurhotId); break; case funCode.SaveNurData: string parentid = funParams[0].ToString(); string hotid = funParams[1].ToString(); string nurcoutent = funParams[2].ToString(); returnObj = FunctionClass.SaveNurData(parentid, hotid, nurcoutent); break; case funCode.UpdateNurData: string upid = funParams[0].ToString(); string uparentid = funParams[1].ToString(); string uhotid = funParams[2].ToString(); string unurcoutent = funParams[3].ToString(); returnObj = FunctionClass.UpdateNurData(upid, uparentid, uhotid, unurcoutent); break; case funCode.DeleNurData: string Nurid = funParams[0].ToString(); returnObj = FunctionClass.DeleNurData(Nurid); break; case funCode.GetPersonNurData: string personId = funParams[0].ToString(); returnObj = FunctionClass.GetPersonNurData(personId); break; case funCode.InputPersonNur: returnObj = FunctionClass.InputPersonNur(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.GetPNurData: returnObj = FunctionClass.GetPNurData(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.GetpushMsgData: returnObj = FunctionClass.GetpushMsgData(funParams[0].ToString()); break; case funCode.DelPush: returnObj = FunctionClass.DelPush(funParams[0].ToString()); break; case funCode.GetPushCount: returnObj = FunctionClass.GetPushCount(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.GetdocInfo: returnObj = FunctionClass.GetdocInfo(funParams[0].ToString()); break; case funCode.GetPushlist: returnObj = FunctionClass.GetPushlist(funParams[0].ToString()); break; case funCode.lookPush: returnObj = FunctionClass.lookPush(funParams[0].ToString(), funParams[1].ToString()); break; #region 积分商城 case funCode.GetNurDiaryList: string nurdiaryxmls = funParams[0].ToString(); returnObj = FunctionClass.GetNurDiaryList(nurdiaryxmls); break; case funCode.GetSportDiaryList: string sportdiaryxmls = funParams[0].ToString(); returnObj = FunctionClass.GetSportDiaryList(sportdiaryxmls); break; case funCode.GetTargetDiaryList: string targetdiaryxmls = funParams[0].ToString(); returnObj = FunctionClass.GetTargetDiaryList(targetdiaryxmls); break; case funCode.GetTargetAppendList: string targetappendxmls = funParams[0].ToString(); returnObj = FunctionClass.GetTargetAppendList(targetappendxmls); break; case funCode.GetLivingList: string lvingdairyxmls = funParams[0].ToString(); returnObj = FunctionClass.GetLivingList(lvingdairyxmls); break; case funCode.GetPharmacyList: string pharmacyxmls = funParams[0].ToString(); returnObj = FunctionClass.GetPharmacyList(pharmacyxmls); break; case funCode.GetManagermentList: string managermentxmls = funParams[0].ToString(); returnObj = FunctionClass.GetManagermentList(managermentxmls); break; case funCode.GetExpenseDetial: string changexmls = funParams[0].ToString(); returnObj = FunctionClass.GetExpenseDetial(changexmls); break; case funCode.GetPointsGoodsList: string goodsxmls = funParams[0].ToString(); returnObj = FunctionClass.GetPointsGoodsList(goodsxmls); break; case funCode.AddTargetAppend: string targetxml = funParams[0].ToString(); returnObj = FunctionClass.AddTargetAppend(targetxml); break; case funCode.MedicalInADD: returnObj = FunctionClass.MedicalInADD(funParams[0].ToString()); break; case funCode.GetMedicalIn: returnObj = FunctionClass.GetMedicalIn(funParams[0].ToString()); break; case funCode.delMedicalIn: returnObj = FunctionClass.delMedicalIn(funParams[0].ToString()); break; case funCode.GetMedicalInUser: returnObj = FunctionClass.GetMedicalInUser(funParams[0].ToString(), funParams[1].ToString()); break; case funCode.AddPharmacyRecord: string pharmacytxml = funParams[0].ToString(); returnObj = FunctionClass.AddPharmacyRecord(pharmacytxml); break; case funCode.AddNurDiary: string nurxml = funParams[0].ToString(); returnObj = FunctionClass.AddNurDiary(nurxml); break; case funCode.AddSportDiary: string sportxml = funParams[0].ToString(); returnObj = FunctionClass.AddSportDiary(sportxml); break; case funCode.AddLivingDiary: string livingxml = funParams[0].ToString(); returnObj = FunctionClass.AddLivingDiary(livingxml); break; case funCode.UpdateStatePT: string states = funParams[0].ToString(); string detailID = funParams[1].ToString(); returnObj = FunctionClass.UpdateStatePT(states, detailID); break; case funCode.CreatePointsUser: string userid = funParams[0].ToString(); returnObj = FunctionClass.CreatePointsUser(userid); break; #endregion #region 指标录入 case funCode.medicQuery: returnObj = FunctionClass.medicQuery(); break; case funCode.medicadd: returnObj = FunctionClass.addmedic(funParams[0].ToString()); break; case funCode.delmedic: returnObj = FunctionClass.delmedic(funParams[0].ToString()); break; case funCode.updatemedic: returnObj = FunctionClass.updatemedic(funParams[0].ToString()); break; case funCode.checkname: returnObj = FunctionClass.checkname(funParams[0].ToString()); break; #endregion #region 新报告数据读取 case funCode.getTangniao: returnObj = FunctionClass.getTangniao(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.getTest: returnObj = FunctionClass.getTest(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.reportIn: returnObj = FunctionClass.reportIn(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString(), funParams[3].ToString(), funParams[4].ToString(), funParams[5].ToString()); break; case funCode.reportUpdate: returnObj = FunctionClass.reportUpdate(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.getFeiPang: returnObj = FunctionClass.getFeiPang(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; case funCode.getScreenData: returnObj = FunctionClass.getScreenData(funParams[0].ToString(), funParams[1].ToString(), funParams[2].ToString()); break; #endregion #region 微信 case funCode.PushAddWxMsg: returnObj = FunctionClass.PushAddWxMsg(funParams[0].ToString()); break; case funCode.PushAddWeiXinAnswer: returnObj = FunctionClass.PushAddWeiXinAnswer(funParams[0].ToString()); break; case funCode.GetBindId: returnObj = FunctionClass.GetBindId(funParams[0].ToString()); break; #endregion case funCode.SaveActionPlan: //保存健康行动计划 returnObj = FunctionClass.SaveActionPlan(funParams); break; case funCode.GetActionPlan: returnObj = FunctionClass.GetActionPlan(funParams); break; case funCode.GetUserInfo: returnObj = FunctionClass.GetUserinfo(funParams); break; default: returnObj = "err_unKnowFuncode"; break; } #endregion } catch (Exception ex) { LogHelper.Log.Error("InvokeMain错误 funCode:" + funCode, ex); returnObj = ex.Message; invokeSuccess = false; } stopwatch.Stop(); InvokeEvent(funCode, checkData, checkKey, funParams, invokeSuccess, stopwatch.Elapsed.TotalSeconds); return(returnObj); }
private void btnAdd_Click(object sender, EventArgs e) { if (!isok) { DXMessageBox.ShowWarning("请输入数据"); return; } DataSet ds = TmoShare.getDataSetFromXML(xmlmedicalIn, true); DataRow dr = ds.Tables[0].NewRow(); try { foreach (DevExpress.XtraEditors.PanelControl temp in this.Controls) { foreach (Control det in temp.Controls) { foreach (DataColumn dc in ds.Tables[0].Columns) { if (det.Name == dc.ColumnName) { if (det.Tag == null) { det.Tag = ""; } string iss = det.Tag.ToString(); if (!string.IsNullOrWhiteSpace(iss)) { if (iss.Split('-')[0] == "0") { DXMessageBox.ShowWarning(iss.Split('-')[1] + ":输入的指标范围不正确!"); det.Focus(); return; } } dr[dc] = det.Text; } } } } dr["user_id"] = user_id.Text; } catch { DXMessageBox.Show("手动录入指标失败", true); return; } ds.Tables[0].Rows.Add(dr); ds.AcceptChanges(); TmoServiceClient.InvokeServerMethodT <string>(funCode.CreatePointsUser, user_id.Text); string result = " -1"; result = (TmoServiceClient.InvokeServerMethodT <int>(funCode.MedicalInADD, TmoShare.getXMLFromDataSet(ds))).ToString(); if (Convert.ToInt16(result) >= 0) { DXMessageBox.Show("录入指标成功!", true); if (this.ParentForm != null) { this.ParentForm.DialogResult = DialogResult.OK; this.ParentForm.Close(); } } else { DXMessageBox.Show("录入指标失败!", true); } }
/// <summary> /// 加载数据 /// </summary> public void GetData() { this.ShowWaitingPanel(() => { try { _dsQueryXml = TmoShare.getDataSetFromXML(SubmitXml, true); if (_dsQueryXml.Tables[0].Rows.Count == 0) { _dsQueryXml.Tables[0].Rows.Add(_dsQueryXml.Tables[0].NewRow()); } _dsQueryXml.Tables[0].Rows[0]["page_size"] = _pageSize.ToString(); _dsQueryXml.Tables[0].Rows[0]["now_page"] = _currentPage.ToString(); if (!string.IsNullOrEmpty(this.opt_sub.Text)) { _dsQueryXml.Tables[0].Rows[0]["opt_sub"] = this.opt_sub.Text; } if (this.optType.EditValue != null && this.optType.EditValue.ToString() != "") { _dsQueryXml.Tables[0].Rows[0]["optType"] = this.optType.EditValue; } if (this.sectionType.EditValue != null && this.sectionType.EditValue.ToString() != "") { _dsQueryXml.Tables[0].Rows[0]["sectionType"] = this.sectionType.EditValue; } if (editcheck.Checked) { _dsQueryXml.Tables[0].Rows[0]["date_edit_begin"] = date_edit_begin.EditValue.ToString(); _dsQueryXml.Tables[0].Rows[0]["date_edit_end"] = date_edit_end.EditValue.ToString(); } string selexml = TmoShare.getXMLFromDataSet(_dsQueryXml); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetArticleData, new object[] { selexml }); _dsGetDataResult = TmoShare.getDataSetFromXML(strmlx); if (TmoShare.DataSetIsNotEmpty(_dsGetDataResult)) { DataTable dtCount = _dsGetDataResult.Tables["Count"]; count = dtCount.Rows[0]["totalRowCount"].ToString(); double countnum = int.Parse(count) / _pageSize; pageCount = Math.Ceiling(countnum).ToString(); return(_dsGetDataResult.Tables[1]); } else { return(null); } } catch { } return(null); }, x => { try { DataTable dt = x as DataTable; //if (dt != null) //{ // foreach (DataRow row in dt.Rows) // { // row["buy_service"] = "延伸服务"; // } //} dgcTree.DataSource = dt; if (gridView1.GroupCount > 0) { gridView1.ExpandAllGroups(); } gridView1.MoveFirst(); if (dt == null) { return; } lblCount.Text = string.Format("共[{0}]条", count); lblPageIndex.Text = string.Format("第[{0}]页,共[{1}]页", _currentPage.ToString(), _pageSize.ToString()); txtPageIndex.Text = _currentPage.ToString(); txtPageSize.Text = _pageSize.ToString(); llblUp.Enabled = _currentPage > 1; llblDown.Enabled = _currentPage < int.Parse(pageCount); } catch (Exception ex) { LogHelper.Log.Error("实体加载数据出错", ex); DXMessageBox.ShowWarning2("数据加载失败!请重试!"); } }); }
public void GetData() { this.ShowWaitingPanel(() => { try { _dsQueryXml = TmoShare.getDataSetFromXML(SubmitXml, true); if (_dsQueryXml.Tables[0].Rows.Count == 0) { _dsQueryXml.Tables[0].Rows.Add(_dsQueryXml.Tables[0].NewRow()); } _dsQueryXml.Tables[0].Rows[0]["doc_code"] = TmoComm.login_docInfo.children_docid; _dsQueryXml.Tables[0].Rows[0]["page_size"] = _pageSize.ToString(); _dsQueryXml.Tables[0].Rows[0]["now_page"] = _currentPage.ToString(); if (!string.IsNullOrEmpty(this.userID.Text)) { _dsQueryXml.Tables[0].Rows[0]["user_id"] = this.userID.Text; } if (!string.IsNullOrEmpty(this.txtName.Text)) { _dsQueryXml.Tables[0].Rows[0]["name"] = this.txtName.Text; } if (Time.Checked) { _dsQueryXml.Tables[0].Rows[0]["date_start"] = datestart.EditValue.ToString(); _dsQueryXml.Tables[0].Rows[0]["date_end"] = dateend.EditValue.ToString(); } string selexml = TmoShare.getXMLFromDataSet(_dsQueryXml); string strmlx = TmoServiceClient.InvokeServerMethodT <string>(funCode.GetSportDiaryList, new object[] { selexml }); _dsGetDataResult = TmoShare.getDataSetFromXML(strmlx); if (TmoShare.DataSetIsNotEmpty(_dsGetDataResult)) { DataTable dtCount = _dsGetDataResult.Tables["Count"]; count = dtCount.Rows[0]["totalRowCount"].ToString(); double countnum = double.Parse(count) / _pageSize; pageCount = Math.Ceiling(countnum).ToString(); return(_dsGetDataResult.Tables[1]); } else { return(null); } } catch { } return(null); }, x => { try { DataTable dt = x as DataTable; dgcTree.DataSource = dt; if (gridView1.GroupCount > 0) { gridView1.ExpandAllGroups(); } gridView1.MoveFirst(); if (dt == null) { return; } lblCount.Text = string.Format("共[{0}]条", count); lblPageIndex.Text = string.Format("第[{0}]页,共[{1}]页", _currentPage.ToString(), _pageSize.ToString()); txtPageIndex.Text = _currentPage.ToString(); txtPageSize.Text = _pageSize.ToString(); llblUp.Enabled = _currentPage > 1; llblDown.Enabled = _currentPage < int.Parse(pageCount); } catch (Exception ex) { LogHelper.Log.Error("实体加载数据出错", ex); DXMessageBox.ShowWarning2("数据加载失败!请重试!"); } }); }
/// <summary> /// 加载数据 /// </summary> public void GetData() { this.ShowWaitingPanel(() => { try { _dsQueryXml = TmoShare.getDataSetFromXML(SubmitXml, true); if (_dsQueryXml.Tables[0].Rows.Count == 0) _dsQueryXml.Tables[0].Rows.Add(_dsQueryXml.Tables[0].NewRow()); _dsQueryXml.Tables[0].Rows[0]["page_size"] = _pageSize.ToString(); _dsQueryXml.Tables[0].Rows[0]["now_page"] = _currentPage.ToString(); if (!string.IsNullOrEmpty(this.txttile.Text)) _dsQueryXml.Tables[0].Rows[0]["tile"] = this.txttile.Text; if (birchb.Checked) { _dsQueryXml.Tables[0].Rows[0]["input_time_begin"] = birth_datestart.EditValue.ToString(); _dsQueryXml.Tables[0].Rows[0]["input_time_end"] = birth_dateend.EditValue.ToString(); } _dsQueryXml.Tables[0].Rows[0]["creater"] = TmoComm.login_docInfo.doc_id; string selexml = TmoShare.getXMLFromDataSet(_dsQueryXml); string strmlx = TmoServiceClient.InvokeServerMethodT<string>(funCode.GetpushMsgData, new object[] { selexml }); _dsGetDataResult = TmoShare.getDataSetFromXML(strmlx); if (TmoShare.DataSetIsNotEmpty(_dsGetDataResult)) { DataTable dtCount = _dsGetDataResult.Tables["Count"]; count = dtCount.Rows[0]["totalRowCount"].ToString(); double countnum = double.Parse(count) / _pageSize; pageCount = Math.Ceiling(countnum).ToString(); return _dsGetDataResult.Tables[1]; } else return null; } catch { } return null; }, x => { try { DataTable dt = x as DataTable; if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dataRow in dt.Rows) { if (dataRow["doc_name"] != null && !string.IsNullOrEmpty(dataRow["doc_name"].ToString())) continue; else if (dataRow["dpt_name"] != null && !string.IsNullOrEmpty(dataRow["dpt_name"].ToString())) { dataRow["doc_name"] = Tmo_CommonClient.Instance.GetDepartmentNamesFromIDs(dataRow.GetDataRowStringValue("dpt_name")); continue; } else if (dataRow["doc_group"] != null && !string.IsNullOrEmpty(dataRow["doc_group"].ToString())) { dataRow["doc_name"] = dataRow["doc_group"].ToString(); continue; } } } dgcTree.DataSource = dt; if (gridView2.GroupCount > 0) { gridView2.ExpandAllGroups(); } gridView2.MoveFirst(); if (dt == null) return; lblCount.Text = string.Format("共[{0}]条", count); lblPageIndex.Text = string.Format("第[{0}]页,共[{1}]页", _currentPage.ToString(), _pageSize.ToString()); txtPageIndex.Text = _currentPage.ToString(); txtPageSize.Text = _pageSize.ToString(); llblUp.Enabled = _currentPage > 1; llblDown.Enabled = _currentPage < int.Parse(pageCount); } catch (Exception ex) { LogHelper.Log.Error("实体加载数据出错", ex); DXMessageBox.ShowWarning2("数据加载失败!请重试!"); } }); }