日期:2014-05-17 浏览次数:21222 次
[WebMethod(Description = "读取Dev.txt文本配置信息")]
public string GetDevConfigData()
{
string[] sysArray = ServiceData._sysArray;
string devContent = ServiceData.GetContent(sysArray, "dev.txt"); //读取文本数据
string[] arrList = devContent.Split('\n');
string[] arrBuf;
string strRelt;
DataSet dataSet = new DataSet("DataSet");
DataTable dTable = dataSet.Tables.Add("ItemConfig");
dTable.Columns.Add("ItemCode",typeof(string));
dTable.Columns.Add("ItemName", typeof(string));
dTable.Columns.Add("ItemType", typeof(string));
dTable.Columns.Add("TypeName", typeof(string));
DataRow row;
for (int i = 0; i < arrList.Length; i++)
{
arrBuf = arrList[i].Split(',');
row = dTable.NewRow();
row["ItemCode"] = arrBuf[2];
row["ItemName"] = arrBuf[3];
row["ItemType"] = arrBuf[4];
row["TypeName"] = ServiceData.TypeContent(arrBuf[4]); //获取类型名称
dTable.Rows.Add(row);