/// <summary> /// "器械管理"按钮触发事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void but_item_Click(object sender, EventArgs e) { if (dgv_01.SelectedRows.Count > 0) { try { int selectedIndex = dgv_01.Rows.IndexOf(dgv_01.SelectedRows[0]); SortedList aa = new SortedList(); aa.Add("name", dgv_01.SelectedRows[0].Cells["s_specialset"].Value.ToString()); aa.Add("id", dgv_01.SelectedRows[0].Cells["idCol"].Value.ToString()); aa.Add("customer", sl_customer.GetKey(sl_customer.IndexOfValue(dgv_01.SelectedRows[0].Cells["s_customer"].Value.ToString()))); aa.Add("customerid", sl_customerid.GetKey(sl_customerid.IndexOfValue(dgv_01.SelectedRows[0].Cells["s_customer"].Value.ToString()))); aa.Add("costcentername", sl_costcenter.GetKey(sl_costcenter.IndexOfValue(dgv_01.SelectedRows[0].Cells["s_costcenter"].Value.ToString()))); aa.Add("costcenter", dgv_01.SelectedRows[0].Cells["s_costcenter"].Value.ToString()); bool iswindows = true; HCSCM_specialset_item_add HH = new HCSCM_specialset_item_add(aa, iswindows); Loaddate(); HH.ShowDialog(); if (dgv_01.Rows.Count > selectedIndex) { dgv_01.CurrentRow = dgv_01.Rows[selectedIndex]; } } catch (Exception ex) { } } else { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("choicechange", EnumPromptMessage.warning, new string[] { "配置", "订单器械模板" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void but_instrument_Click(object sender, EventArgs e) { if (dgv_01.SelectedRows.Count > 0) { try { int selectedIndex = dgv_01.Rows.IndexOf(dgv_01.SelectedRows[0]); SortedList aa = new SortedList(); aa.Add("name", dgv_01.SelectedRows[0].Cells["ca_name"].Value.ToString()); aa.Add("id", dgv_01.SelectedRows[0].Cells["id"].Value.ToString()); aa.Add("type", Sl_type_04.GetKey(Sl_type_04.IndexOfValue(dgv_01.SelectedRows[0].Cells["ca_type"].Value.ToString())).ToString()); aa.Add("customer", dgv_01.SelectedRows[0].Cells["customer_code"].Value.ToString()); aa.Add("customerid", Sl_typeid_05.GetKey(Sl_typeid_05.IndexOfValue(dgv_01.SelectedRows[0].Cells["customer_code"].Value.ToString()))); aa.Add("costcentername", Sl_type_01.GetKey(Sl_type_01.IndexOfValue(dgv_01.SelectedRows[0].Cells["cost_center"].Value.ToString()))); aa.Add("costcenter", dgv_01.SelectedRows[0].Cells["cost_center"].Value.ToString()); bool iswindows = false; HCSCM_specialset_item_add HCSR = new HCSCM_specialset_item_add(aa, iswindows); HCSR.ShowDialog(); } catch (Exception ex) { } } }
private void but_ok_Click(object sender, EventArgs e) { if (this.tb_name.Text.Trim() == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillname", EnumPromptMessage.warning, new string[] { "" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_customer.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillcustomer", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_cost_center.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillcostcenter", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_material.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillmaterial", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.tb_price.Text.Trim() == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillprice", EnumPromptMessage.warning, new string[] { "处理" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_put.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillput", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.tb_weight.Text.Trim() == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillweight", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.tb_stu.Text.Trim() == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillsize", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_washing.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillwastype", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_sterilizer.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillstrtype", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_complexity.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("filldifficulty", EnumPromptMessage.warning), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_type.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("filltype", EnumPromptMessage.warning, new string[] { "包的" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (tb_times.Text.Trim() == "") { tb_times.Text = ""; } if (tb_minimum_set.Text.Trim() == "") { tb_minimum_set.Text = ""; } try { if (Selectid == "") { CnasRemotCall reCnasRemotCall = new CnasRemotCall(); #region 判断名字是否存在 if (order_set == "1")//判断是否是订单包 { SortedList sttemp01 = new SortedList(); sttemp01.Add(1, CnasBaseData.SystemID); sttemp01.Add(2, sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text.Trim()))); sttemp01.Add(3, "1"); DataTable getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-base-sec050", sttemp01);//503 if (getdt != null) { DataRow[] getdt_01 = getdt.Select(); foreach (DataRow dr in getdt_01) { if (tb_name.Text.Trim().ToString() == dr["ca_name"].ToString().Trim()) { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("namerepetition", EnumPromptMessage.warning, new string[] { "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } } else { SortedList sttemp01 = new SortedList(); sttemp01.Add(1, CnasBaseData.SystemID); sttemp01.Add(2, sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text.Trim()))); sttemp01.Add(3, "0"); string sql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-set-base-sec050", sttemp01); DataTable getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-base-sec050", sttemp01);//503 if (getdt != null) { DataRow[] getdt_01 = getdt.Select(); foreach (DataRow dr in getdt_01) { if (tb_name.Text.Trim().ToString() == dr["ca_name"].ToString().Trim()) { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("namerepetition", EnumPromptMessage.warning, new string[] { "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } } #endregion SortedList sltmp = new SortedList(); SortedList sltmp01 = new SortedList(); sltmp.Add(1, tb_name.Text.Trim()); //名字 sltmp.Add(2, tb_barcode.Text.Trim()); //条码 sltmp.Add(3, tb_expiration.Text.Trim()); //保质期 sltmp.Add(4, tb_price.Text.Trim()); //价格 sltmp.Add(5, tb_remarks.Text.Trim()); //备注 sltmp.Add(6, tb_size.Text.Trim()); //大小 if (tb_times.Text.Trim() == "") { sltmp.Add(7, "NULL");//使用次数 } else { sltmp.Add(7, tb_times.Text.Trim());//使用次数 } sltmp.Add(8, tb_weight.Text.Trim()); //重量 sltmp.Add(9, cb_complexity.Text.Trim().Substring(0, 1)); //清洗难度 sltmp.Add(10, cb_type.Text.Trim().Substring(0, 1)); //包的类型 sltmp.Add(11, sl_type_04.GetKey(sl_type_04.IndexOfValue(cb_cost_center.Text.Trim()))); //成本中心 sltmp.Add(12, sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text.Trim()))); //顾客 sltmp.Add(13, sl_type_02.GetKey(sl_type_02.IndexOfValue(cb_material.Text.Trim()))); //打包材料 sltmp.Add(14, cb_put.Text.Trim().Substring(0, 1)); //摆放方式 sltmp.Add(15, sl_type_06.GetKey(sl_type_06.IndexOfValue(cb_sterilizer.Text.Trim()))); //灭菌类型 sltmp.Add(16, sl_type_01.GetKey(sl_type_01.IndexOfValue(cb_washing.Text.Trim()))); //清洗类型 if (this.rb_normal.Checked) { sltmp.Add(17, 1);//为正常包 } else if (this.rb_urgent.Checked) { sltmp.Add(17, 2);//为紧急包 } else { sltmp.Add(17, 3);//为非常紧急包 } sltmp.Add(18, CnasBaseData.SystemID); sltmp.Add(19, CnasBaseData.UserName); //创建人 if (this.cb_if.Checked) //是否为院内特殊包 { sltmp.Add(20, 1); } else { sltmp.Add(20, 0); } sltmp.Add(21, order_set); if (tb_minimum_set.Text == "") { sltmp.Add(22, "NULL"); } else { sltmp.Add(22, tb_minimum_set.Text); } if (this.cb_RFID.Checked)//是否须要RFID追溯 { sltmp.Add(23, 1); } else { sltmp.Add(23, 0); } sltmp01.Add(1, sltmp); // string strtmp = reCnasRemotCall.RemotInterface.CheckUPData(1, "HCS-set-base-add001", sltmp01, null); int recint = reCnasRemotCall.RemotInterface.UPData(1, "HCS-set-base-add001", sltmp01, null); if (recint > -1) { if (order_set == "1") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("addsuccessful", EnumPromptMessage.warning, new string[] { "订单包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } else { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("addsuccessful", EnumPromptMessage.warning, new string[] { "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } } else { MessageBox.Show("对不起,系统增加出错,请联系管理员。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } if (order_set == "0") { string sql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-set-base-sec003", null); DataTable getdt2 = reCnasRemotCall.RemotInterface.SelectData("HCS-set-base-sec003", null);//查询基本包最后创建的信息,取id121 string strid = ""; if (getdt2 != null) { DataRow arrayDR = getdt2.Select()[0]; strid = arrayDR["id"].ToString().Trim(); SortedList slindata = new SortedList(); slindata.Add("ca_name", tb_name.Text.Trim()); slindata.Add("id", arrayDR["id"].ToString().Trim()); slindata.Add("ca_type", cb_type.Text.Trim().Substring(0, 1)); slindata.Add("cost_center", sl_type_04.GetKey(sl_type_04.IndexOfValue(cb_cost_center.Text)).ToString()); slindata.Add("customer_code", sl_type_03_01.GetKey(sl_type_03_01.IndexOfValue(cb_customer.Text)).ToString()); //string strname = tb_name.Text.Trim(); //string strtype = cb_type.Text.Trim().Substring(0, 1); //string strcc = sl_type_04.GetKey(sl_type_04.IndexOfValue(cb_cost_center.Text)).ToString(); HCSCM_set_manager_item hcsm = new HCSCM_set_manager_item(slindata, true); hcsm.ShowDialog(); this.Close(); } } else { string sql = reCnasRemotCall.RemotInterface.CheckSelectData("HCS-set-base-sec003", null); DataTable getdt2 = reCnasRemotCall.RemotInterface.SelectData("HCS-set-base-sec003", null);//查询基本包最后创建的信息,取id121 string strid = ""; if (getdt2 != null) { DataRow arrayDR = getdt2.Select()[0]; strid = arrayDR["id"].ToString().Trim(); SortedList aa = new SortedList(); aa.Add("name", tb_name.Text.Trim()); aa.Add("id", arrayDR["id"].ToString().Trim()); aa.Add("type", cb_type.Text.Trim().Substring(0, 1)); aa.Add("customer", sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text))); aa.Add("customerid", sl_type_03_01.GetKey(sl_type_03_01.IndexOfValue(cb_customer.Text))); aa.Add("costcentername", sl_type_04.GetKey(sl_type_04.IndexOfValue(cb_cost_center.Text))); aa.Add("costcenter", cb_cost_center.Text); bool iswindows = false; HCSCM_specialset_item_add HCSR = new HCSCM_specialset_item_add(aa, iswindows); HCSR.ShowDialog(); this.Close(); } } } else { #region 判断名字是否存在 CnasRemotCall reCnasRemotCall = new CnasRemotCall(); if (this.tb_name.Text.Trim() != Strselectname) { if (order_set == "1")//判断是否是订单包 { SortedList sttemp01 = new SortedList(); sttemp01.Add(1, CnasBaseData.SystemID); sttemp01.Add(2, sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text.Trim()))); sttemp01.Add(3, "1"); DataTable getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-base-sec050", sttemp01);//503 if (getdt != null) { DataRow[] getdt_01 = getdt.Select(); foreach (DataRow dr in getdt_01) { if (tb_name.Text.Trim().ToString() == dr["ca_name"].ToString().Trim()) { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("namerepetition", EnumPromptMessage.warning, new string[] { "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } } else { SortedList sttemp01 = new SortedList(); sttemp01.Add(1, CnasBaseData.SystemID); sttemp01.Add(2, sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text.Trim()))); sttemp01.Add(3, "0"); DataTable getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-set-base-sec050", sttemp01);//503 if (getdt != null) { DataRow[] getdt_01 = getdt.Select(); foreach (DataRow dr in getdt_01) { if (tb_name.Text.Trim().ToString() == dr["ca_name"].ToString().Trim()) { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("namerepetition", EnumPromptMessage.warning, new string[] { "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } } } #endregion SortedList sltmp = new SortedList(); SortedList sltmp01 = new SortedList(); sltmp.Add(1, tb_name.Text.Trim()); //名字 sltmp.Add(2, tb_expiration.Text.Trim()); //保质期 sltmp.Add(3, tb_price.Text.Trim()); //价格 sltmp.Add(4, tb_remarks.Text.Trim()); //备注 sltmp.Add(5, tb_size.Text.Trim()); //大小 if (tb_times.Text.Trim() == "") { sltmp.Add(6, "NULL");//使用次数 } else { sltmp.Add(6, tb_times.Text.Trim());//使用次数 } sltmp.Add(7, tb_weight.Text.Trim()); //重量 sltmp.Add(8, cb_complexity.Text.Trim().Substring(0, 1)); //清洗难度 sltmp.Add(9, cb_type.Text.Trim().Substring(0, 1)); //包的类型 sltmp.Add(10, sl_type_04.GetKey(sl_type_04.IndexOfValue(cb_cost_center.Text.Trim()))); //成本中心 sltmp.Add(11, sl_type_03.GetKey(sl_type_03.IndexOfValue(cb_customer.Text.Trim()))); //顾客 sltmp.Add(12, sl_type_02.GetKey(sl_type_02.IndexOfValue(cb_material.Text.Trim()))); //打包材料 sltmp.Add(13, cb_put.Text.Trim().Substring(0, 1)); //摆放方式 sltmp.Add(14, sl_type_06.GetKey(sl_type_06.IndexOfValue(cb_sterilizer.Text.Trim()))); //灭菌类型 sltmp.Add(15, sl_type_01.GetKey(sl_type_01.IndexOfValue(cb_washing.Text.Trim()))); //清洗类型 if (this.rb_normal.Checked) { sltmp.Add(16, 1);//为正常包 } else if (this.rb_urgent.Checked) { sltmp.Add(16, 2);//为紧急包 } else { sltmp.Add(16, 3);//为非常紧急包 } sltmp.Add(17, CnasBaseData.UserName); if (this.cb_if.Checked) { sltmp.Add(18, 1); } else { sltmp.Add(18, 0); } sltmp.Add(19, order_set); if (tb_minimum_set.Text == "") { sltmp.Add(20, "NULL"); } else { sltmp.Add(20, tb_minimum_set.Text); } if (this.cb_RFID.Checked)//是否须要RFID追溯 { sltmp.Add(21, 1); } else { sltmp.Add(21, 0); } sltmp.Add(22, Selectid); sltmp01.Add(1, sltmp); // string strtmp = reCnasRemotCall.RemotInterface.CheckUPData(1, "HCS-set-base-up001", sltmp01, null); int recint = reCnasRemotCall.RemotInterface.UPData(1, "HCS-set-base-up001", sltmp01, null); if (recint > -1) { if (order_set == "1") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("updatesuccessful", EnumPromptMessage.warning, new string[] { "订单包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } else { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("updatesuccessful", EnumPromptMessage.warning, new string[] { "基本包" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } } else { MessageBox.Show("对不起,系统修改出错,请联系管理员。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } } } catch (Exception ex) { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("unknowerror", EnumPromptMessage.error, new string[] { ex.Message }), "错误信息", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } }
private void but_ok_Click(object sender, EventArgs e) { #region 验证 if (tb_name.Text.Trim() == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("fillname", EnumPromptMessage.warning, new string[] { "模板" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (cb_customer.Text.Trim() == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("filltype", EnumPromptMessage.warning, new string[] { "客户" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.cb_location.Text == "") { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("filltype", EnumPromptMessage.warning, new string[] { "使用地点" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } try { #endregion CnasRemotCall reCnasRemotCall = new CnasRemotCall(); SortedList sttName = new SortedList(); sttName.Add(1, CnasBaseData.SystemID); sttName.Add(2, cb_customer.Text); DataTable CustomerName = reCnasRemotCall.RemotInterface.SelectData("HCS-specialset-sec002", sttName); SortedList sttemp = new SortedList(); sttemp.Add(1, sl_location.GetKey(sl_location.IndexOfValue(cb_location.Text.Trim()))); DataTable getdt = reCnasRemotCall.RemotInterface.SelectData("HCS-use-location-sec010", sttemp); //49 sl_costcenterbar.Clear(); if (getdt != null) { int ii = getdt.Rows.Count; if (ii <= 0) { return; } for (int i = 0; i < ii; i++) { if (getdt.Rows[i]["bar_code"].ToString() != null && getdt.Rows[i]["ca_name"].ToString().Trim() != null) { sl_costcenterbar.Add(getdt.Rows[i]["bar_code"].ToString().Trim(), getdt.Rows[i]["ca_name"].ToString().Trim()); } } } if (Strselectid == "") { if (CustomerName != null) { for (int i = 0; i < CustomerName.Rows.Count; i++) { if (CustomerName.Rows[i]["name"].ToString() == tb_name.Text.Trim()) { MessageBox.Show("该医院已存在该订单模板。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } SortedList sltmp = new SortedList(); SortedList sltmp01 = new SortedList(); sltmp.Add(1, tb_name.Text.Trim()); //名字 sltmp.Add(2, CnasBaseData.UserBaseInfo.UserName); sltmp.Add(3, CnasBaseData.SystemID); sltmp.Add(4, sl_customer.GetKey(sl_customer.IndexOfValue(cb_customer.Text.ToString().ToString()))); sltmp.Add(5, sl_location.GetKey(sl_location.IndexOfValue(cb_location.Text.ToString().ToString()))); sltmp.Add(6, getdt.Rows[0]["bar_code"].ToString()); sltmp01.Add(1, sltmp); int recint = reCnasRemotCall.RemotInterface.UPData(1, "HCS-specialset-add001", sltmp01, null); if (recint > -1) { MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("addsuccessful", EnumPromptMessage.warning, new string[] { "订单器械模板" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); SortedList slttp = new SortedList(); slttp.Add(1, CnasBaseData.SystemID); slttp.Add(2, cb_customer.Text.Trim()); DataTable Specialset = reCnasRemotCall.RemotInterface.SelectData("HCS-specialset-sec002", slttp); if (Specialset != null && Specialset.Rows.Count > 0) { for (int i = 0; i < Specialset.Rows.Count; i++) { sl_spe.Add(Specialset.Rows[i]["id"].ToString(), Specialset.Rows[i]["name"].ToString()); } } SortedList slttmp = new SortedList(); slttmp.Add("id", sl_spe.GetKey((int)sl_spe.IndexOfValue(tb_name.Text)).ToString()); slttmp.Add("name", tb_name.Text); slttmp.Add("customer", sl_customer.GetKey(sl_customer.IndexOfValue(cb_customer.Text.ToString()))); slttmp.Add("customerid", sl_customerid.GetKey(sl_customerid.IndexOfValue(cb_customer.Text.ToString()))); slttmp.Add("costcentername", getdt.Rows[0]["bar_code"].ToString()); slttmp.Add("costcenter", sl_costcenterbar[getdt.Rows[0]["bar_code"].ToString()].ToString()); HCSCM_specialset_item_add hcsm = new HCSCM_specialset_item_add(slttmp, true); hcsm.ShowDialog(); } } else { if (tb_name.Text != Strselectname) { if (CustomerName != null) { for (int i = 0; i < CustomerName.Rows.Count; i++) { if (CustomerName.Rows[i]["name"].ToString() == tb_name.Text.Trim()) { MessageBox.Show("该医院已存在该订单模板。", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } } } SortedList slltp = new SortedList(); SortedList slltp01 = new SortedList(); slltp.Add(1, tb_name.Text); slltp.Add(2, CnasBaseData.UserBaseInfo.UserName); slltp.Add(3, sl_customer.GetKey(sl_customer.IndexOfValue(cb_customer.Text.ToString().ToString()))); slltp.Add(4, sl_location.GetKey(sl_location.IndexOfValue(cb_location.Text.ToString().ToString()))); slltp.Add(5, getdt.Rows[0]["bar_code"].ToString()); slltp.Add(6, Strselectid); slltp01.Add(1, slltp); int recint = reCnasRemotCall.RemotInterface.UPData(1, "HCS-specialset-up001", slltp01, null); } } catch (Exception ex) { } MessageBox.Show(PromptMessageXmlHelper.Instance.GetPromptMessage("updatesuccessful", EnumPromptMessage.warning, new string[] { "订单器械模板" }), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); }