周五特别版本

master
nodyang 1 year ago
parent 1ec39f960d
commit a61f54582e

@ -1,9 +1,26 @@
using Mesnac.Action.ChemicalWeighing.LjMaterial; using System.Collections.Generic;
using System.Data;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjDevice namespace Mesnac.Action.ChemicalWeighing.LjDevice
{ {
public class DeviceHelp:DBHelp public class DeviceHelp:DBHelp
{ {
public static IList<MyNameValue> GetAllNameValue()
{
var dataTable = GetTable("select Id,Name from PressureSetting");
var dr = dataTable.Rows;
IList<MyNameValue> ls = new List<MyNameValue>();
foreach (DataRow o in dr)
{
ls.Add(new MyNameValue()
{
Id =(int)o["Id"],
Name = o["Name"].ToString()
});
}
return ls;
}
} }
} }

@ -28,9 +28,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjDry
}; };
} }
// select Id, Name, , , , , , , , , Currnet, Pressure from DrySetting;
private void DoWord() private void DoWord()
{ {

@ -0,0 +1,35 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjMetage
{
public class MetageDb:DBHelp
{
public static IList<MyNameValue> GetRiGuan()
{
var myNameValues =
GetAllNameValue().Where(x => x.Id > 15 && x.Id < 28).ToList();
return myNameValues;
}
public static IList<MyNameValue> GetAllNameValue()
{
var dataTable = GetTable("select Id,Name from PressureSetting");
var dr = dataTable.Rows;
IList<MyNameValue> ls = new List<MyNameValue>();
foreach (DataRow o in dr)
{
ls.Add(new MyNameValue()
{
Id =(int)o["Id"],
Name = o["Name"].ToString()
});
}
return ls;
}
}
}

@ -0,0 +1,30 @@
using System.Collections.Generic;
using System.Data;
using System.Linq;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjPressure
{
public class PressureSettingDB:DBHelp
{
public static IList<MyNameValue> GetAllNameValue()
{
var dataTable = GetTable("select Id,Name from PressureSetting");
var dr = dataTable.Rows;
IList<MyNameValue> ls = new List<MyNameValue>();
foreach (DataRow o in dr)
{
ls.Add(new MyNameValue()
{
Id =(int)o["Id"],
Name = o["Name"].ToString()
});
}
return ls;
}
}
}

@ -268,6 +268,7 @@
<DependentUpon>FrmMetage.cs</DependentUpon> <DependentUpon>FrmMetage.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="LjMetage\InitDbAction.cs" /> <Compile Include="LjMetage\InitDbAction.cs" />
<Compile Include="LjMetage\MetageDb.cs" />
<Compile Include="LjMetage\MetageHelp.cs" /> <Compile Include="LjMetage\MetageHelp.cs" />
<Compile Include="LjMetage\MetageView.cs" /> <Compile Include="LjMetage\MetageView.cs" />
<Compile Include="LjMetage\UpAction.cs" /> <Compile Include="LjMetage\UpAction.cs" />
@ -281,6 +282,7 @@
</Compile> </Compile>
<Compile Include="LjPressure\InitDbAction.cs" /> <Compile Include="LjPressure\InitDbAction.cs" />
<Compile Include="LjPressure\PressurePLC.cs" /> <Compile Include="LjPressure\PressurePLC.cs" />
<Compile Include="LjPressure\PressureSettingDB.cs" />
<Compile Include="LjPressure\PressureSettingView.cs" /> <Compile Include="LjPressure\PressureSettingView.cs" />
<Compile Include="LjPressure\UpAction.cs" /> <Compile Include="LjPressure\UpAction.cs" />
<Compile Include="LjPressure\UpdateAction.cs" /> <Compile Include="LjPressure\UpdateAction.cs" />

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save