#region 将取得所有资源记录集合组合json数据格式的字符串并返回 public string getResourceAll() { ArrayList list = interData.getResourceAll(); jsonHelp.totalCountS = list.Count; jsonHelp.ResetJSONHelp(); foreach (Hashtable ht in list) { foreach (DictionaryEntry d in ht) { jsonHelp.addItem(d.Key.ToString(), d.Value.ToString()); } jsonHelp.addItemOk(); } return jsonHelp.ToString(); } #endregion #region 取出所有资源记录 public ArrayList getResourceAll() { string sql = "select resourceId,resourceName,resourceParentId,resourceTypeId,resourceCreateDate,resourceMark from Resource_T_Infor "; DataSet ds = conData.selectData(sql); ArrayList list = new ArrayList(); if (ds != null) { Hashtable ht = null; for (int i = 0; i < ds.Tables.Count; i++) { foreach (DataRow dr in ds.Tables[i].Rows) { ht = new Hashtable(); foreach (DataColumn dc in dr.Table.Columns) { ht.Add(dc.ColumnName, dr[dc.ColumnName]); } list.Add(ht); } } return list; } else { return null; } } #endregion