using System.Collections.Generic; using System.IO; public class FreeStepListProxy : DataProxy { public List m_OpertaionFreeConditions; /// /// 表格名称 /// string m_TableName; /// /// 根据id获取信息 /// public OperationStepFreeCondition GetOpStepDataInfoById(int operationId) { return m_OpertaionFreeConditions.Find(t => t.id == operationId.ToString()); } /// /// 从Excel文件读取流程信息 /// /// 表明 /// 表头 /// public List ReadStepMsgInfoFromTable(string tableName) { m_TableName = tableName + "_FreeCondition" + GlobalConfig.excelSuffix; m_OpertaionFreeConditions = new List(); string tmpPath = System.IO.Path.Combine(GlobalConfig.operateTablePath, m_TableName); m_OpertaionFreeConditions = ExcelHelper.ReadInfoFromExcel(tmpPath, 1); return m_OpertaionFreeConditions; } public OperationStepFreeCondition GetOperationStepDataInfoById(int id) { return m_OpertaionFreeConditions.Find(t => int.Parse(t.id) == id); } /// /// 保存当前数据 /// public void SaveOperation(string TableName) { string tmpPath = Path.Combine(GlobalConfig.operateTablePath, m_TableName); //ExcelHelper.WriteInfoToExcel(tmpPath, m_StepMsgInfos); } }