/// <summary> /// 取字符串首字母 /// </summary> /// <param name="text"></param> /// <param name="args"></param> /// <returns></returns> public static string ToPY(this string text) { return(PinYin.GetCodstring(text)); }
protected override void InitData() { var companyList = companyService.GetList().Select(i => new InputItem { DisPlayName = i.CompName, Value = i.CompCode, InputCode1 = i.CompCode, InputCode2 = PinYin.GetCodstring(i.CompName) }).ToList(); ERPHelper.Instance.SetGridLookUpEdit(CompCodeTextEdit, companyList, 2); //CompCodeTextEdit.EditValueChanging += new DevExpress.XtraEditors.Controls.ChangingEventHandler(CompCodeTextEdit_EditValueChanging); }