You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjDevice/DeviceHelp.cs

26 lines
716 B
C#

using System.Collections.Generic;
using System.Data;
using Mesnac.Action.ChemicalWeighing.LjMaterial;
namespace Mesnac.Action.ChemicalWeighing.LjDevice
{
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;
}
}
}