//批量代码转名称 public HelpValueNameEntity[] GetAllNames(IList <HelpValueNameEntity> list) { //foreach (HelpValueNameEntity item in list) //{ // item.Name = commDac.GetName(item.HelpID, item.Code, item.HelpType, string.Empty, item.OutJsonQuery, item.HelpType); //} foreach (HelpValueNameEntity item in list) { //if (item.HelpType == "ngRichHelp" || item.HelpType == "ngMultiRichHelp")//从数据库获取帮助信息 //{ // item.Name = richDac.GetName(item.HelpID, item.Code, item.SelectMode, string.Empty, item.OutJsonQuery, item.HelpType); //} //else//ngCommonHelp,ngComboBox,ngTreeComboBox暂时从xml配置文件获得帮助信息 //{ // item.Name = commDac.GetName(item.HelpID, item.Code, item.SelectMode, string.Empty, item.OutJsonQuery, item.HelpType); //} if (item.HelpType == "ngCommonHelp")//ngCommonHelp暂时从xml配置文件获得帮助信息 { item.Name = commDac.GetName(item.HelpID, item.Code, item.SelectMode, string.Empty, item.OutJsonQuery, item.HelpType); } else if (item.HelpType == "ngCustomFormHelp" || item.HelpType == "ngCustFormMutilHelp") { item.Name = helpDac.GetName(item.HelpID, item.Code, item.SelectMode); } else//从数据库获取帮助信息 { item.Name = richDac.GetName(item.HelpID, item.Code, item.SelectMode, string.Empty, item.OutJsonQuery, item.HelpType); } } return(list.ToArray <HelpValueNameEntity>()); }
public string GetName(string helpid, string code, string helptype, string clientQuery, string outJsonQuery) { try { return(dac.GetName(helpid, code, string.Empty, clientQuery, outJsonQuery, helptype)); } catch (Exception) { } return(string.Empty); }