/// <summary> /// 编码转换,将Guid转成对应数据字典的名称 /// </summary> /// <param name="table"></param> /// <returns></returns> private static DataTable FindDictionaryTitle(this DataTable table) { #region 编码转换,将Guid转成对应数据字典的名称 RoadFlow.Platform.DictionaryBLL dictionaryBLL = new RoadFlow.Platform.DictionaryBLL(); var dictionarys = dictionaryBLL.GetListAll(); //编码转换 for (int i = 0; i < table.Rows.Count; i++) { for (int j = 0; j < table.Columns.Count; j++) { if (dictionarys.FindAll(x => x.Code == table.Columns[j].ColumnName).Count > 0) { string temp = (string)table.Rows[i][j]; table.Rows[i][j] = dictionarys.Find(x => x.ID.ToString() == temp).Title; } } } #endregion return(table); }