12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OTSExtremum.Data
- {
- public class ParticleData
- {
- private SqlHelper dbHelper;
- public ParticleData(string path)
- {
- dbHelper = new SqlHelper("data source='" + path + "\\FIELD_FILES\\Inclusion.db'");
- }
- /// <summary>
- /// 获取ParticleList
- /// </summary>
- /// <param name="model">Feature</param>
- /// <returns></returns>
- public DataTable GetParticleListAndEm()
- {
- string sqlp = @"select *,
- (select group_concat(name||'-'||Percentage,';')
- from ElementChemistry where XRayId =INcAData.XRayId and fieldid=INcAData.fieldid ) as Element
- from INcAData where xrayid>-1";
- DataTable DT = dbHelper.ExecuteDataTable(sqlp, null);
- // List<Model.Particle> listp = dbHelper.TableToList<Model.Particle>(DT);
- return DT;
- }
- }
- }
|