Esempio n. 1
0
        protected override bool ProcessDialogKey(Keys keyData)
        {
            if (this.fpKind.ContainsFocus)
            {
                if (keyData == Keys.Enter)
                {
                    if (this.fpKind_Sheet1.ActiveColumnIndex == 3)
                    {
                        Neusoft.HISFC.Object.Base.Spell        spCode  = new Neusoft.HISFC.Object.Base.Spell();
                        Neusoft.HISFC.Management.Manager.Spell mySpell = new Neusoft.HISFC.Management.Manager.Spell();

                        spCode = (Neusoft.HISFC.Object.Base.Spell)mySpell.Get(fpKind_Sheet1.Cells[this.fpKind_Sheet1.ActiveRowIndex, 3].Text.ToString());

                        if (spCode.SpellCode.Length > 10)
                        {
                            spCode.SpellCode = spCode.SpellCode.Substring(0, 10);
                        }
                        if (spCode.WBCode.Length > 10)
                        {
                            spCode.WBCode = spCode.WBCode.Substring(0, 10);
                        }

                        this.fpKind_Sheet1.Cells[this.fpKind_Sheet1.ActiveRowIndex, 4].Value = spCode.SpellCode;
                        this.fpKind_Sheet1.Cells[this.fpKind_Sheet1.ActiveRowIndex, 5].Value = spCode.WBCode;
                    }

                    this.fpKind_Sheet1.ActiveColumnIndex++;
                }
            }
            return(base.ProcessDialogKey(keyData));
        }
Esempio n. 2
0
        private void fpKind_LeaveCell(object sender, FarPoint.Win.Spread.LeaveCellEventArgs e)
        {
            if (e.Column == 3)
            {
                if (fpKind_Sheet1.Cells[e.Row, 3].Text.ToString() == "")
                {
                    return;
                }
                Neusoft.HISFC.Object.Base.Spell        spCode  = new Neusoft.HISFC.Object.Base.Spell();
                Neusoft.HISFC.Management.Manager.Spell mySpell = new Neusoft.HISFC.Management.Manager.Spell();

                spCode = (Neusoft.HISFC.Object.Base.Spell)mySpell.Get(fpKind_Sheet1.Cells[e.Row, 3].Text.ToString());

                if (spCode.SpellCode.Length > 10)
                {
                    spCode.SpellCode = spCode.SpellCode.Substring(0, 10);
                }
                if (spCode.WBCode.Length > 10)
                {
                    spCode.WBCode = spCode.WBCode.Substring(0, 10);
                }

                this.fpKind_Sheet1.Cells[e.Row, 4].Value = spCode.SpellCode;
                this.fpKind_Sheet1.Cells[e.Row, 5].Value = spCode.WBCode;
            }
        }
Esempio n. 3
0
 /// <summary>
 /// 根据传入的字符串获取拼音码
 /// </summary>
 ///<returns>返回传入字符串的拼音码实体</returns>
 private Neusoft.HISFC.Object.Base.Spell GetSpell(string strData)
 {
     Neusoft.HISFC.Management.Manager.Spell spellManager = new Neusoft.HISFC.Management.Manager.Spell();
     Neusoft.HISFC.Object.Base.Spell        spellCode    = (Neusoft.HISFC.Object.Base.Spell)spellManager.Get(strData.Trim());
     if (spellCode == null)
     {
         return(new Neusoft.HISFC.Object.Base.Spell());
     }
     else
     {
         return(spellCode);
     }
 }