/// <summary> /// 获取 BasinEntity格式数据,并生成列表 /// </summary> /// <param name="filePath"></param> /// <returns></returns> //public List<BasinEntity> GetBasinList(string filePath) //{ // //RawDataDAL rdd = new RawDataDAL(); // DataTable dt = ReadFromExcel(filePath,0); // List<BasinEntity> list = new List<BasinEntity>(); // DataAssignment dA = new DataAssignment(); // if (dt != null) // { // return dA.Assign(list, dt); // } // return null; //} /// <summary> /// 获取 BlockEntity格式数据,并生成列表 /// </summary> /// <param name="filePath"></param> /// <returns></returns> //public List<BlockEntity> GetBlockList(string filePath) //{ // //RawDataDAL rdd = new RawDataDAL(); // DataTable dt = ReadFromExcel(filePath,1); // List<BlockEntity> list = new List<BlockEntity>(); // DataAssignment dA = new DataAssignment(); // if (dt != null) // { // return dA.Assign(list, dt); // } // return null; //} /// <summary> /// /// </summary> /// <param name="filePath"></param> /// <returns></returns> public List <TargetEntity> GetTargetList(string filePath) { //RawDataDAL rdd = new RawDataDAL(); DataTable dt = ReadFromExcel(filePath, 0); List <TargetEntity> list = new List <TargetEntity>(); DataAssignment dA = new DataAssignment(); if (dt != null) { return(dA.Assign(list, dt)); } return(null); }
public List <UserInfo> GetList() { //构造要查询的sql语句 string sql = "select * from user_info"; //使用SqliteHelper进行查询,得到结果 DataTable dt = MySqlHelper.GetDataTable(sql, CommandType.Text); DataAssignment da = new DataAssignment(); //将Dt中的数据转存到list中 List <UserInfo> list = new List <UserInfo>(); return(da.Assign(list, dt)); }
public List <TargetEntity> GetList() { string sql = "select * from RawData"; DataTable dt = SqliteHelper.GetDataTable(sql); DataAssignment dA = new DataAssignment(); //构造要查询的 sql语句 // string sql = "select * from RawData"; //使用SQLIT额Helper进行查询 // DataTable dt = SqliteHelper.GetDataTable(sql); //将dt中的数据转存到list当中 List <TargetEntity> list = new List <TargetEntity>(); //DataTable dt = new DataTable(); return(dA.Assign(list, dt)); }