private void tbItemName_TextChanged(object sender, EventArgs e) { //各种码获得 Neusoft.HISFC.BizLogic.Manager.Spell spell = new Neusoft.HISFC.BizLogic.Manager.Spell(); Neusoft.HISFC.Models.Base.ISpell ispell = spell.Get(this.tbItemName.Text); //将拼音码和五笔码取前8位到界面,保存的时候也是8位 if (ispell == null) { this.tbSpellCode.Text = ""; return; } if (ispell.SpellCode != null && ispell.SpellCode.Length > 8) { this.tbSpellCode.Text = ispell.SpellCode.Substring(0, 8); } else { this.tbSpellCode.Text = ispell.SpellCode; } if (ispell.SpellCode != null && ispell.WBCode.Length > 8) { this.tbWbCode.Text = ispell.WBCode.Substring(0, 8); } else { this.tbWbCode.Text = ispell.WBCode; } }
private void AddListToTable(List <Neusoft.HISFC.Models.RADT.PatientInfo> patientList) { this.dt.Rows.Clear(); this.dt.AcceptChanges(); foreach (Neusoft.HISFC.Models.RADT.PatientInfo patient in patientList) { Neusoft.HISFC.Models.Base.ISpell spell = this.spellManager.Get(patient.Name); DataRow dr = this.dt.NewRow(); dr["确认回收"] = false; dr["姓名"] = patient.Name; dr["住院号"] = patient.PID.PatientNO; dr["出院日期"] = patient.PVisit.OutTime.ToString("yyy-MM-dd"); dr["入院日期"] = patient.PVisit.InTime.ToString("yyy-MM-dd"); dr["性别"] = (patient.Sex.ID.ToString() == "M") ? "男" : "女"; dr["年龄"] = (DateTime.Now.Year - patient.Birthday.Year).ToString(); dr["付款方式"] = patient.Pact.Name; dr["主治医师"] = patient.PVisit.AttendingDoctor.Name; dr["违规天数"] = (DateTime.Now - patient.PVisit.OutTime).Days.ToString(); dr["费用合计"] = patient.FT.TotCost.ToString(); dr["SPELLCODE"] = spell.SpellCode; dr["OBJECT"] = patient; this.dt.Rows.Add(dr); } this.dt.AcceptChanges(); }
/// <summary> /// 过滤 /// </summary> /// <returns></returns> protected int Filter() { if (ds.Tables.Count <= 0) { return(-1); } string strPID = null; string strNM = null; string stPY = null; strPID = Neusoft.FrameWork.Public.String.TakeOffSpecialChar(this.ntbPatientID.Text.Trim()); strNM = Neusoft.FrameWork.Public.String.TakeOffSpecialChar(this.ntbPatientNM.Text.Trim()); Neusoft.HISFC.BizLogic.Manager.Spell spellManager = new Neusoft.HISFC.BizLogic.Manager.Spell(); Neusoft.HISFC.Models.Base.ISpell spell = spellManager.Get(strNM); stPY = spell.SpellCode; try { ds.Tables[0].DefaultView.RowFilter = "住院号 like '%" + strPID + "%' AND 姓名 like '%" + stPY + "%'"; } catch (Exception ex) { MessageBox.Show("查询失败!" + ex.Message); return(-1); } return(1); }
protected override void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e) { base.fpSpread1_Sheet1_CellChanged(sender, e); //如果没有装载数据完成,则不做处理 if (!this.isDataLoaded) { return; } //如果改变了名称,则拼音码、五笔码自动发生变化 if (this.fpSpread1_Sheet1.Columns[e.Column].Label == "名称") { Column column = this.GetColumnByName("拼音码"); if (column != null /*&& this.fpSpread1_Sheet1.Cells[e.Row,column.Index].Text.Length==0*/) { this.fpSpread1_Sheet1.Cells[e.Row, column.Index].Text = Neusoft.FrameWork.Public.String.GetSpell(this.fpSpread1_Sheet1.Cells[e.Row, e.Column].Text); } column = this.GetColumnByName("五笔码"); if (column != null) { Neusoft.HISFC.Models.Base.ISpell spCode = this.spellManager.Get(this.fpSpread1_Sheet1.Cells[e.Row, e.Column].Text); if (spCode != null) { this.fpSpread1_Sheet1.Cells[e.Row, column.Index].Text = spCode.WBCode; } } } }
private void tbItemName_KeyDown(object sender, KeyEventArgs e) { //各种码获得 Neusoft.HISFC.BizLogic.Manager.Spell spell = new Neusoft.HISFC.BizLogic.Manager.Spell(); Neusoft.HISFC.Models.Base.ISpell ispell = spell.Get(this.tbItemName.Text); this.tbSpellCode.Text = ispell.SpellCode; this.tbWbCode.Text = ispell.WBCode; }
/// <summary> /// /// </summary> /// <param name="key"></param> public void AddKey(string key) { filter = filter + key; foreach (ListViewItem item in this.listView1.Items) { Neusoft.HISFC.Models.Base.ISpell spell = item.Tag as Neusoft.HISFC.Models.Base.ISpell; if (spell.SpellCode.StartsWith(filter)) { item.Selected = true; return; } } }
private void tbName_Leave(object sender, EventArgs e) { if (this.tbName.Text.Trim().Equals("")) { return; } Neusoft.HISFC.BizProcess.Integrate.Manager spell = new Neusoft.HISFC.BizProcess.Integrate.Manager(); Neusoft.HISFC.Models.Base.ISpell s = spell.Get(this.tbName.Text); this.tbSpell.Text = s.SpellCode; this.tbWb.Text = s.WBCode; this.tbUser.Text = s.UserCode; }
protected override void fpSpread1_EditModeOff(object sender, EventArgs e) { base.fpSpread1_EditModeOff(sender, e); int columnIndex = this.fpSpread1_Sheet1.ActiveColumnIndex; int rowIndex = this.fpSpread1_Sheet1.ActiveRowIndex; if (this.fpSpread1_Sheet1.Columns[columnIndex].Label == "名称") { string words = this.fpSpread1_Sheet1.Cells[rowIndex, columnIndex].Text; Neusoft.HISFC.Models.Base.ISpell spellInfo = spellManager.Get(words); int spellColumn = this.GetColumnIndexFromLabel("拼音码"); if (spellColumn != -1) { this.fpSpread1_Sheet1.Cells[rowIndex, spellColumn].Text = spellInfo.SpellCode; } int wbColumn = this.GetColumnIndexFromLabel("五笔码"); if (wbColumn != -1) { this.fpSpread1_Sheet1.Cells[rowIndex, wbColumn].Text = spellInfo.WBCode; } } }
private void ValidText() { //{07252C73-80B1-42b6-A8FE-44AF3707CF54} if (base.Text.Trim() == "") { return; } //if (base.Text == " " || base.Text == " " || base.Text == " ") //{ // ShowSelectDialog(); // return; //} if (this.DropDownStyle == ComboBoxStyle.DropDownList) { return;//如果只是选择的,不需要判断dd } try { //{B185DD6A-4CFE-469c-A7AB-6187C4C698EA} if (!isChangeText()) { return; } for (int i = 0; i < alItems.Count; i++) { #region 查找匹配 Neusoft.FrameWork.Models.NeuObject o = (Neusoft.FrameWork.Models.NeuObject)alItems[i]; try { if (o.Name.ToUpper().Trim() == base.Text.ToUpper().Trim()) { showSelectText(o); return; } } catch { } try { if (o.ID.ToUpper().Trim() == base.Text.ToUpper().Trim()) { showSelectText(o); return; } } catch { } try { if (o.Memo != null && o.Memo.ToUpper().Trim() == base.Text.ToUpper().Trim()) { showSelectText(o); return; } } catch { } try { Neusoft.HISFC.Models.Base.ISpell Spell = o as Neusoft.HISFC.Models.Base.ISpell; switch (iSpellCode) { case 0: if ((Spell.SpellCode != null && Spell.SpellCode.ToUpper().Trim() == base.Text.ToUpper().Trim()) || (Spell.WBCode != null && Spell.WBCode.ToUpper().Trim() == base.Text.ToUpper().Trim()) || (Spell.UserCode != null && Spell.UserCode.ToUpper().Trim() == base.Text.ToUpper().Trim())) { showSelectText(o); return; } break; case 1: if (Spell.SpellCode != null && Spell.SpellCode.ToUpper().Trim() == base.Text.ToUpper().Trim()) { showSelectText(o); return; } break; case 2: if (Spell.WBCode != null && Spell.WBCode.ToUpper().Trim() == base.Text.ToUpper().Trim()) { showSelectText(o); return; } break; case 3: if (Spell.UserCode != null && Spell.UserCode.ToUpper().Trim() == base.Text.ToUpper().Trim()) { showSelectText(o); return; } break; } } catch { } #endregion } if (this.isItemOnly) //没有找到 是只能选择 { if (this.isLike) //模糊查询 { #region 查找匹配 for (int i = 0; i < alItems.Count; i++) { Neusoft.FrameWork.Models.NeuObject o = (Neusoft.FrameWork.Models.NeuObject)alItems[i]; try { if (o.Name.ToUpper().Trim().IndexOf(base.Text.ToUpper().Trim()) >= 0) { showSelectText(o); return; } } catch { } try { if (o.ID.ToUpper().Trim().IndexOf(base.Text.ToUpper().Trim()) >= 0) { showSelectText(o); return; } } catch { } try { if (o.Memo != null && o.Memo != "") { if (o.Memo != null && o.Memo.ToUpper().Trim().IndexOf(base.Text.ToUpper().Trim()) >= 0) { showSelectText(o); return; } } } catch { } } #endregion } base.Text = "";//其它 } } catch { if (this.isItemOnly) { base.Text = ""; } } }