/// <summary> /// /// </summary> private void InitDropList() { try { string sql = string.Format(@"SELECT Code AS Value , Value AS Name FROM HIS_InterfaceHN.dbo.JC_AuditFlag"); InitComboBox(this.cBoxAuditFlag, sql); this.cBoxAuditFlag.SelectedValue = "-1"; sql = string.Format(@"SELECT HIS_InterfaceHN.dbo.JC_TypeCompareTable.Name AS 'Value' , HIS_InterfaceHN.dbo.JC_TypeCompareTable.Value AS 'Name' FROM HIS_InterfaceHN.dbo.JC_TypeCompareTable INNER JOIN HIS_InterfaceHN.dbo.JC_Type ON HIS_InterfaceHN.dbo.JC_Type.ID = HIS_InterfaceHN.dbo.JC_TypeCompareTable.TypeID WHERE HIS_InterfaceHN.dbo.JC_Type.TableID = N'medi_item_type'"); InitComboBox(this.cBoxMatchType, sql); this.cBoxMatchType.SelectedValue = "-1"; sql = string.Format(@"SELECT Name AS 'Value' , Value AS 'Name' FROM HIS_InterfaceHN.dbo.JC_TypeCompareTable WHERE TypeID = 6"); } catch (Exception e) { CommonFunctions.MsgError(e.Message); } }
/// <summary> /// /// </summary> /// <param name="context"></param> public override void UpdateUIControlContext(object context) { try { base.UpdateUIControlContext(context); Parameter parameter = (Parameter)context; switch (parameter.Name) { case InterfaceUIMsg.DisabledLoginButton: this.btnLogin.Enabled = false; break; case InterfaceUIMsg.EnabledLoginButton: this.btnLogin.Enabled = true; break; case InterfaceUIMsg.SetLoginStatus: SetLoginStatus(parameter.Value); break; default: break; } } catch (Exception ex) { CommonFunctions.MsgError(ex.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnBIZC131101_Click(object sender, EventArgs e) { try { this.interfaceHN.Func_ID = this.txtBoxFuncID.Text.Trim(); this.interfaceHN.Start(); this.interfaceHN.ClearParameterList(); this.interfaceHN.AddParameter("idcard", this.txtBoxIDCard.Text.Trim()); this.interfaceHN.AddParameter("hospital_id", this.txtBoxHospitalID.Text.Trim()); this.interfaceHN.AddParameter("biz_type", this.txtBoxBiz.Text.Trim()); this.interfaceHN.AddParameter("center_id", this.txtBoxCenterID.Text.Trim()); this.interfaceHN.PutCols(); this.interfaceHN.Run(); this.interfaceHN.SetResultset("personinfo"); List <string> listName = new List <string>(); this.interfaceHN.GetsByName("name", ref listName); foreach (string str in listName) { this.richTxtBoxPersonInfo.AppendText(str); } } catch (Exception ee) { CommonFunctions.MsgError(ee.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void c1FlexGridFunc_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { int rowIndex = e.Row; string id = this.c1FlexGridFunc.Rows[rowIndex]["ID"].ToString().Trim(); string SQLString = string.Format(@"UPDATE [HIS_InterfaceHN].[dbo].[Func] SET [FuncID] = N'{0}'--<FuncID, nvarchar(50),> , [Name] = N'{1}'--<Name, nvarchar(50),> , [Details] = N'{2}'--<Details, nvarchar(512),> WHERE ID = {3}", this.c1FlexGridFunc.Rows[rowIndex]["编码"].ToString().Trim(), this.c1FlexGridFunc.Rows[rowIndex]["名称"].ToString().Trim(), string.Empty, id); try { Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); } catch (Exception ee) { CommonFunctions.MsgError("修改接口函数信息失败,失败原因:" + ee.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void richTextBoxReturnValue_Validated(object sender, EventArgs e) { string id = this.lblID.Tag.ToString().Trim(); string returnValue = this.richTextBoxReturnValue.Text.Trim(); string[] strArray = returnValue.Split('\n'); string selectSQL = string.Empty; foreach (string str in strArray) { selectSQL += string.Format(@"select {0},N'{1}' union all ", id, str); } selectSQL = selectSQL.Substring(0, selectSQL.Length - @"union all ".Length); try { string SQLString = string.Format(@"DELETE HIS_InterfaceHN.dbo.FuncReturnValue WHERE FuncID = {0}; INSERT INTO HIS_InterfaceHN.dbo.FuncReturnValue ( FuncID, ReturnValueDesc ) {1}", id, selectSQL); Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); } catch (Exception ee) { CommonFunctions.MsgError("修改返回值说明失败,失败原因:" + ee.Message); } }
/// <summary> /// /// </summary> /// <param name="context"></param> public override void UpdateUIControlContext(object context) { try { base.UpdateUIControlContext(context); Parameter parameter = (Parameter)context; switch (parameter.Name) { case Diagnoise_UIMsg.DisabledQueryButton: this.btnQuery.Enabled = false; break; case Diagnoise_UIMsg.EnabledQueryButton: this.btnQuery.Enabled = true; break; case Diagnoise_UIMsg.BindC1FlexGridDiagnoise: BindC1FlexGridDiagnoise(parameter.Object); break; default: break; } } catch (Exception ex) { CommonFunctions.MsgError(ex.Message); } }
/// <summary> /// /// </summary> /// <param name="context"></param> public override void UpdateUIControlContext(object context) { try { base.UpdateUIControlContext(context); Parameter parameter = (Parameter)context; switch (parameter.Name) { case MsgUIMsg.SetC1FlexGridMsgNull: SetC1FlexGridMsgNull(); break; case MsgUIMsg.BindC1FlexGridMsgDataSet: BindC1FlexGridMsgDataSet(parameter.Object); break; default: break; } } catch (Exception ex) { CommonFunctions.MsgError(ex.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLogin_Click(object sender, EventArgs e) { try { this.interfaceHN.Func_ID = "0"; this.interfaceHN.Start(); this.interfaceHN.ClearParameterList(); this.interfaceHN.AddParameter("login_id", this.txtBoxLoginID.Text.Trim()); this.interfaceHN.AddParameter("login_password", this.txtBoxLoginPasswd.Text.Trim()); this.interfaceHN.PutCols(); long value = this.interfaceHN.Run(); if (value == 0) { CommonFunctions.MsgError("登陆成功!!!"); } } catch (Exception ee) { CommonFunctions.MsgError(ee.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnExcel_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Excel文件|*.xls"; if (sfd.ShowDialog() == DialogResult.OK) { try { DisplayTips("正在导出数据集......"); string fileName = sfd.FileName; if (!fileName.EndsWith(".xls")) { fileName += ".xls"; } this.c1FlexGridDataset.SaveGrid(fileName, FileFormatEnum.Excel, FileFlags.IncludeFixedCells); CloseTips(); CommonFunctions.MsgInfo("文件" + fileName + "保存成功!!!"); } catch (Exception ex) { CloseTips(); CommonFunctions.MsgError("导出数据集失败,失败原因:" + ex.Message); } } }
/// <summary> /// 更新UI控件中的内容 /// </summary> /// <param name="flag"></param> /// <param name="context"></param> public virtual void UpdateUIControlContext(object context) { Parameter parameter = (Parameter)context; if (parameter.Object == null) { switch (parameter.Name) { case UIMsg.Close: CloseTips(); break; case UIMsg.Display: DisplayTips(parameter.Value); break; case UIMsg.MsgError: CommonFunctions.MsgError(parameter.Value); break; case UIMsg.MsgInfo: CommonFunctions.MsgInfo(parameter.Value); break; case UIMsg.WriteMsg: WriteTips(parameter.Value); break; default: break; } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnClearCompare_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("你真的要清除已对照标志吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk); if (dr == DialogResult.Yes) { string SQLString = string.Format(@"UPDATE HIS_InterfaceHN.dbo.Interface_AddMatch SET CompareStatus = 2"); try { int temp = Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); if (temp > 0) { CommonFunctions.MsgInfo("清除已对照记录成功,清除已对照记录" + temp + "条!!!"); return; } CommonFunctions.MsgError("没有清除任何已对照记录,请查看是否存在医院目录匹配信息!!!"); } catch (Exception ex) { CommonFunctions.MsgError("清除已对照标志发生错误,错误原因:" + ex.Message); } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, EventArgs e) { try { string configPath = Application.StartupPath + "\\" + Application.ProductName + ".exe"; string appInfo = this.txtBoxAppInfo.Text.Trim(); string appTitle = this.txtBoxAppTitle.Text.Trim(); string url = this.txtBoxUrl.Text.Trim(); string dataBase = this.txtBoxDataBase.Text.Trim(); string userName = this.txtBoxUserName.Text.Trim(); string passwd = this.txtBoxPasswd.Text.Trim(); string commPort = this.txtBoxCommPort.Text.Trim(); Alif.DBUtility.PubConstant.UpdateConfig(configPath, "AppInfo", appInfo); Alif.DBUtility.PubConstant.UpdateConfig(configPath, "AppTitle", appTitle); Alif.DBUtility.PubConstant.UpdateConfig(configPath, "ConnectionString", string.Format("server={0};database={1};uid={2};pwd={3}", url, dataBase, userName, passwd)); Alif.DBUtility.PubConstant.UpdateConfig(configPath, "CommPort", commPort); this.lblTips.Text = "参数修改成功!!!"; this.lblTips.ForeColor = Color.Green; } catch (Exception ee) { this.lblTips.Text = string.Empty; CommonFunctions.MsgError("参数修改失败,失败原因:" + ee.Message); } }
/// <summary> /// /// </summary> /// <param name="rowIndex"></param> private void SetRowBackground(int rowIndex) { try { string staple_flag = this.c1FlexGridAddMatch.Rows[rowIndex]["staple_flag"].ToString().Trim(); string match_type = this.c1FlexGridAddMatch.Rows[rowIndex]["match_type"].ToString().Trim(); string status = this.c1FlexGridAddMatch.Rows[rowIndex]["CompareStatus"].ToString().Trim(); if (match_type != "诊疗项目") { Color color; CellStyle mystyle; string name = string.Empty; switch (staple_flag) { //甲类 case "1": color = Color.LightGreen; name = "MyStyleLightGreen"; break; //乙类 case "2": color = Color.LightCoral; name = "MyStyleLightCoral"; break; //全自费 case "9": color = Color.LightYellow; name = "MyStyleLightYellow"; break; //无定义 default: color = Color.White; name = "MyStyleWhite"; break; } mystyle = this.c1FlexGridAddMatch.Styles.Add(name); mystyle.BackColor = color; this.c1FlexGridAddMatch.Rows[rowIndex].Style = mystyle; } else { Color color = Color.Goldenrod; CellStyle myStyle = this.c1FlexGridAddMatch.Styles.Add("MyStyleGoldenrod"); myStyle.BackColor = color; this.c1FlexGridAddMatch.Rows[rowIndex].Style = myStyle; } } catch (Exception e) { CommonFunctions.MsgError(e.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAdd_Click(object sender, EventArgs e) { string id = this.txtBoxID.Text.Trim(); string name = this.txtBoxName.Text.Trim(); if (string.Empty == id) { CommonFunctions.MsgInfo("接口函数编码不能为空!!!"); this.txtBoxID.Focus(); return; } if (string.Empty == name) { CommonFunctions.MsgInfo("接口函数名称不能为空!!!"); this.txtBoxName.Focus(); return; } try { string SQLString = string.Empty; SQLString = string.Format(@"IF EXISTS ( SELECT * FROM HIS_InterfaceHN.dbo.Func WHERE FuncID = '{0}' AND Name='{1}' ) BEGIN RAISERROR('已经存在对应编号和名称的接口编码!!!',16,1); END ELSE BEGIN INSERT INTO HIS_InterfaceHN.dbo.Func ( FuncID , Name , Details ) VALUES ( N'{0}' , -- ID - nvarchar(50) N'{1}' , -- Name - nvarchar(50) N'' -- Details - nvarchar(512) ) END", id, name); Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); CommonFunctions.MsgInfo("添加成功!!!"); this.txtBoxID.Clear(); this.txtBoxName.Clear(); this.txtBoxID.Focus(); } catch (Exception ee) { CommonFunctions.MsgError("添加接口函数失败失败原因:" + ee.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Frm_Fund_Load(object sender, EventArgs e) { if (this._indi_id == string.Empty || this._biz_type == string.Empty) { CommonFunctions.MsgError("个人电脑号或者业务类型为空,不能进行基金状态的查询,请联系管理员!!!"); return; } CreateAndStartThread(this._thread, ThreadQueryPersonInfo); }
/// <summary> /// 关闭窗口 /// </summary> private void CloseReadCard() { if (this._CardNumbers == string.Empty) { CommonFunctions.MsgError("获取的社保卡号为空,请重试!!!"); return; } this.Close(); }
/// <summary> /// /// </summary> /// <param name="id"></param> private void QueryInterfaceDetailInfo(string id) { try { DataSet ds = InterfaceFunc.GetInstance().GetInterfaceFuncDetails(id); this.lblNameID.Text = string.Format("{0}({1})", ds.Tables[0].Rows[0]["Name"].ToString().Trim(), ds.Tables[0].Rows[0]["FuncID"].ToString().Trim()); this.lblID.Tag = ds.Tables[0].Rows[0]["ID"].ToString().Trim(); this.lblID.Text = ds.Tables[0].Rows[0]["FuncID"].ToString().Trim(); this.richTxtBoxDetails.Text = ds.Tables[0].Rows[0]["Details"].ToString().Trim(); this.richTextBoxReturnValue.Clear(); foreach (DataRow dr in ds.Tables[1].Rows) { this.richTextBoxReturnValue.AppendText(dr["返回值说明"].ToString().Trim() + "\n"); } this.c1FlexGridPara.DataSource = ds.Tables[2]; this.c1FlexGridPara.Cols["ID"].Visible = false; this.c1FlexGridPara.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.RestrictCols; for (int i = this.c1FlexGridPara.Cols.Fixed; i <= this.c1FlexGridPara.Cols.Count - 1; i++) { this.c1FlexGridPara.Cols[i].AllowMerging = true; } this.c1FlexGridPara.Cols["最大长度"].Width = 60; this.c1FlexGridPara.Cols["是否为空"].Width = 60; this.c1FlexGridPara.Cols["备注"].Width = 220; if (ds.Tables.Count > 3) { this.c1FlexGridDataset.DataSource = ds.Tables[3]; this.c1FlexGridDataset.AllowMerging = C1.Win.C1FlexGrid.AllowMergingEnum.RestrictCols; for (int i = this.c1FlexGridDataset.Cols.Fixed; i <= this.c1FlexGridDataset.Cols.Count - 1; i++) { this.c1FlexGridDataset.Cols[i].AllowMerging = true; } this.c1FlexGridDataset.Cols["ID"].Visible = false; this.c1FlexGridDataset.Cols["数据集"].Width = 60; this.c1FlexGridDataset.Cols["最大长度"].Width = 60; this.c1FlexGridDataset.Cols["备注"].Width = 320; } } catch (Exception e) { CommonFunctions.MsgError(e.Message); } }
/// <summary> /// 设置串口 /// </summary> private void SetCommPort() { try { this.lblCommPort.Text = "当前串口号:" + Alif.DBUtility.PubConstant.GetKeyValue("CommPort"); } catch (Exception ex) { CommonFunctions.MsgError("没有在App.config文件中配置CommPort信息,异常原因:" + ex.Message); } }
/// <summary> /// 设置目录对照是否自动跳跃 /// </summary> public void SetDirAutoCompareIsJump() { try { string SQLString = string.Format(@"select CodeValue from HIS_InterfaceHN.dbo.Setup where Code='100001001'"); this.DirAutoCompareIsJump = int.Parse(Alif.DBUtility.DbHelperSQL.Query(SQLString).Tables[0].Rows[0][0].ToString().Trim()); } catch { CommonFunctions.MsgError("没有在HIS_InterfaceHN.dbo.Setup数据表中设置100001001(目录对照是否跳过多个记录自动匹配)记录!!!"); } }
/// <summary> /// /// </summary> /// <returns></returns> public string AppTitle() { try { return(Alif.DBUtility.PubConstant.GetKeyValue("AppTitle")); } catch (Exception e) { CommonFunctions.MsgError("获取应用程序标题失败,失败原因:" + e.Message); return(string.Empty); } }
private void QueryFuncDetail(string id) { try { DataSet ds = InterfaceFunc.GetInstance().GetInterfaceFuncDetails(id); this.lblNameID.Text = string.Format("{0}({1})", ds.Tables[0].Rows[0]["Name"].ToString().Trim(), ds.Tables[0].Rows[0]["FuncID"].ToString().Trim()); this.lblID.Tag = ds.Tables[0].Rows[0]["ID"].ToString().Trim(); this.lblID.Text = ds.Tables[0].Rows[0]["FuncID"].ToString().Trim(); this.richTxtBoxDetails.Text = ds.Tables[0].Rows[0]["Details"].ToString().Trim(); this.richTextBoxReturnValue.Clear(); foreach (DataRow dr in ds.Tables[1].Rows) { this.richTextBoxReturnValue.AppendText(dr["返回值说明"].ToString().Trim() + "\n"); } this.c1FlexGridPara.DataSource = ds.Tables[2]; this.c1FlexGridPara.Cols["ID"].Visible = false; this.c1FlexGridPara.Cols["最大长度"].Visible = false; this.c1FlexGridPara.Cols["是否为空"].Visible = false; this.c1FlexGridPara.Cols["备注"].Visible = false; this.interfacHNDataset.Clear(); this.cBoxDataset.DataSource = null; this.c1FlexGridDataset.DataSource = null; if (ds.Tables.Count > 3) { if (this.interfacHNDataset.Rows.Count > 0) { this.interfacHNDataset.Clear(); } this.interfacHNDataset = ds.Tables[3]; } if (ds.Tables.Count > 4) { this.cBoxDataset.DataSource = ds.Tables[4]; this.cBoxDataset.DisplayMember = "Name"; this.cBoxDataset.ValueMember = "Name"; } } catch (Exception e) { CommonFunctions.MsgError(e.Message); } }
/// <summary> /// /// </summary> private void ResizeThisForm() { try { string[] strArray = this._PageSize.Replace(",", ",").Split(','); this.Width = int.Parse(strArray[0]); this.Height = int.Parse(strArray[1]); } catch (Exception ex) { CommonFunctions.MsgError("重置打印窗体大小发生错误,错误原因:" + ex.Message); } }
/// <summary> /// 登陆 /// </summary> /// <param name="unitID"></param> /// <param name="userID"></param> /// <param name="passwd"></param> private void Login(string unitID, string userID, string passwd) { passwd = DEncrypt.DESEncrypt.Encrypt(passwd); long id = 0; try { IDataParameter[] parameter = new IDataParameter[3]; parameter[0] = new SqlParameter("@UnitID", unitID); parameter[1] = new SqlParameter("@UserID", userID); parameter[2] = new SqlParameter("@UserPasswd", passwd); DataSet ds = Alif.DBUtility.DbHelperSQL.RunProcedure("HIS_InterfaceHN.dbo.P_CheckUser", parameter, "P_CheckUser"); if (ds.Tables.Count == 1 && ds.Tables[0].Rows.Count == 1) { id = long.Parse(ds.Tables[0].Rows[0]["ID"].ToString().Trim()); } else { throw new Exception(string.Empty); } } catch (Exception ex) { CommonFunctions.MsgError(ex.Message); return; } try { this.Hide(); Frm_Interface frm = new Frm_Interface(id); frm.ShowDialog(); frm = null; this.Close(); } catch (Exception ee) { CommonFunctions.MsgError(ee.Message); this.Close(); } }
/// <summary> /// 查询接口功能 /// </summary> /// <param name="id">编码</param> /// <param name="name">名称</param> /// <param name="fuzzy">是否模糊查询</param> private void QueryInterfaceFunc(string funcID, string name, bool fuzzy) { try { this.c1FlexGridFunc.DataSource = InterfaceFunc.GetInstance().GetInterfaceFunc(funcID, name, fuzzy).Tables[0]; this.c1FlexGridFunc.Cols[1].Visible = false; this.c1FlexGridFunc.Cols[2].Width = 100; this.c1FlexGridFunc.Cols[3].Width = 240; } catch (Exception e) { CommonFunctions.MsgError(e.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void c1FlexGridInterfaceJC_MouseDoubleClick(object sender, MouseEventArgs e) { if (this._selectedC1FlexGridAddMatchRowIndex > 0 && this._selectedC1FlexGridJCCenterDirRowIndex > 0) { string addMatchID = this.c1FlexGridAddMatch.Rows[this._selectedC1FlexGridAddMatchRowIndex]["ID"].ToString().Trim(); string jcDirID = this.c1FlexGridInterfaceJC.Rows[this._selectedC1FlexGridJCCenterDirRowIndex]["ID"].ToString().Trim(); string compareStatus = this.c1FlexGridAddMatch.Rows[this._selectedC1FlexGridAddMatchRowIndex]["CompareStatus"].ToString().Trim(); string uploadStatus = this.c1FlexGridAddMatch.Rows[this._selectedC1FlexGridAddMatchRowIndex]["UploadStatus"].ToString().Trim(); if ("已对照" == compareStatus && "已上传" == uploadStatus) { return; } if ("已对照" == compareStatus) { DialogResult dr = MessageBox.Show("你真的要更新这条已对照的匹配信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk); if (dr != DialogResult.Yes) { return; } } try { DisplayTips("正在更新新增医院目录匹配信息,请稍后......"); IDataParameter[] parameters = new IDataParameter[2]; parameters[0] = new SqlParameter("@addMatchID", addMatchID); parameters[1] = new SqlParameter("@CenterDirID", jcDirID); Alif.DBUtility.DbHelperSQL.RunProcedure("HIS_InterfaceHN.dbo.P_UpdateAddMatch", parameters, "P_UpdateAddMatch"); CloseTips(); CommonFunctions.MsgInfo("正在更新新增医院目录匹配信息成功!!!"); this.btnQueryData.PerformClick(); } catch (Exception ex) { CloseTips(); CommonFunctions.MsgError("更新新增医院目录匹配信息错误,错误原因:" + ex.Message); } } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void richTxtBoxDetails_Validated(object sender, EventArgs e) { string id = this.lblID.Tag.ToString().Trim(); string details = this.richTxtBoxDetails.Text.Trim(); try { string SQLString = string.Format(@"update HIS_InterfaceHN.dbo.Func set Details=N'{0}' where ID = {1}", details, id); Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); } catch (Exception ee) { CommonFunctions.MsgError("修改功能描述失败,失败原因:" + ee.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void c1FlexGridPara_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { string id = this.lblID.Tag.ToString().Trim(); int rowIndex = e.Row; int colIndex = e.Col; string SQLString = string.Format(@"UPDATE A SET Name = N'{6}' FROM HIS_InterfaceHN.dbo.FuncPara A INNER JOIN HIS_InterfaceHN.dbo.FuncParaList B ON B.ParaID = A.ID WHERE B.ID = {5}; UPDATE [HIS_InterfaceHN].[dbo].[FuncParaList] SET [Name] = N'{0}' --<Name, nchar(20),> , [DefaultValue] = N'{7}'--<DefaultValue, nvarchar(512),> , [NameDesc] = N'{1}' --<NameDesc, nvarchar(50),> , [MaxLength] = N'{2}'-- <MaxLength, int,> , [IsNull] = N'{3}'--<IsNull, tinyint,> , [Details] = N'{4}'--<Details, nvarchar(512),> WHERE ID = {5}", this.c1FlexGridPara.Rows[rowIndex]["入参"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["入参说明"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["最大长度"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["是否为空"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["备注"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["ID"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["参数说明"].ToString().Trim(), this.c1FlexGridPara.Rows[rowIndex]["默认值"].ToString().Trim()); try { Alif.DBUtility.DbHelperSQL.ExecuteSql(SQLString); QueryInterfaceDetailInfo(id); } catch (Exception ee) { CommonFunctions.MsgError(string.Format("修改编号{0}的参数失败,失败原因:{1}", this.c1FlexGridPara.Rows[rowIndex]["ID"].ToString().Trim(), ee.Message)); } }
/// <summary> /// 初始化通知地址 /// </summary> private void InitMsgUrl() { try { string SQLString = string.Format(@"SELECT CodeValue FROM his.dbo.setup WHERE Code = '000001005001'"); DataSet ds = Alif.DBUtility.DbHelperSQL.Query(SQLString); string url = ds.Tables[0].Rows[0]["CodeValue"].ToString().Trim(); this.webBrowserMsg.Url = new Uri(url); } catch (Exception e) { CommonFunctions.MsgError("初始化通知地址出错,错误原因:" + e.Message); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnInterfaceInit_Click(object sender, EventArgs e) { try { this.interfaceHN.Addr = this.txtBoxServer.Text.Trim(); this.interfaceHN.Port = int.Parse(this.txtBoxPort.Text.Trim()); this.interfaceHN.Servlet = this.txtBoxServlet.Text.Trim(); this.interfaceHN.Oper_centerid = "632802"; this.interfaceHN.Oper_hospitalid = "632802002"; this.interfaceHN.Oper_staffid = "000"; this.interfaceHN.NewInterfaceWithInit(); } catch (Exception ee) { CommonFunctions.MsgError(ee.Message); } }
/// <summary> /// /// </summary> private void QueryFunc(string id) { try { DataSet ds = InterfaceClass.Func.Func.Functions(id); this.c1FlexGridFunc.DataSource = ds.Tables[0]; this.c1FlexGridFunc.Cols["ID"].Visible = false; this.c1FlexGridFunc.Cols["FuncID"].Caption = "编码"; this.c1FlexGridFunc.Cols["Name"].Caption = "名称"; this.c1FlexGridFunc.Cols["Name"].Width = 210; } catch (Exception e) { CommonFunctions.MsgError(e.Message); } }