using IStation.BLL;
|
using System.Collections.Generic;
|
using System.Linq;
|
|
namespace IStation.DataProvider
|
{
|
/// <summary>
|
/// 泵站 数据生成器
|
/// </summary>
|
public class FileConvert
|
{
|
|
/// <summary>
|
/// 转换
|
/// </summary>
|
public static void ConvertDb()
|
{
|
var EquipmentList = new Equipment().GetAll();
|
if (EquipmentList != null && EquipmentList.Any())
|
{
|
new DAL.Equipment().Inserts(EquipmentList);
|
}
|
var EquipmentGroupList = new EquipmentGroup().GetAll();
|
if (EquipmentGroupList != null && EquipmentGroupList.Any())
|
{
|
new DAL.EquipmentGroup().Inserts(EquipmentGroupList);
|
}
|
var EquipmentMonitorMappingList = new EquipmentMonitorMapping().GetAll();
|
if (EquipmentMonitorMappingList != null && EquipmentMonitorMappingList.Any())
|
{
|
new DAL.EquipmentMonitorMapping().Inserts(EquipmentMonitorMappingList);
|
}
|
|
/* var MonitorDataSourcesList = new MonitorDataSources().GetAll();
|
if (MonitorDataSourcesList != null && MonitorDataSourcesList.Any())
|
{
|
new DAL.MonitorDataSources().Inserts(MonitorDataSourcesList);
|
}*/
|
|
var MonitorPointList = new MonitorPoint().GetAll();
|
if (MonitorPointList != null && MonitorPointList.Any())
|
{
|
new DAL.MonitorPoint().Inserts(MonitorPointList);
|
}
|
var MonitorPointGroupList = new MonitorPointGroup().GetAll();
|
if (MonitorPointGroupList != null && MonitorPointGroupList.Any())
|
{
|
new DAL.MonitorPointGroup().Inserts(MonitorPointGroupList);
|
}
|
var MonitorPointMappingList = new MonitorPointMapping().GetAll();
|
if (MonitorPointMappingList != null && MonitorPointMappingList.Any())
|
{
|
new DAL.MonitorPointMapping().Inserts(MonitorPointMappingList);
|
}
|
var SignalList = new Signal().GetAll();
|
if (SignalList != null && SignalList.Any())
|
{
|
new DAL.Signal().Inserts(SignalList);
|
}
|
|
var PumpCurveList = new PumpCurve().GetAll();
|
if (PumpCurveList != null && PumpCurveList.Any())
|
{
|
new DAL.PumpCurve().Inserts(PumpCurveList);
|
}
|
var PumpCurveMappingList = new PumpCurveMapping().GetAll();
|
if (PumpCurveMappingList != null && PumpCurveMappingList.Any())
|
{
|
new DAL.PumpCurveMapping().Inserts(PumpCurveMappingList);
|
}
|
|
var StationList = new Station().GetAll();
|
if (StationList != null && StationList.Any())
|
{
|
new DAL.Station().Inserts(StationList);
|
}
|
|
|
|
|
}
|
|
|
}
|
}
|