|
|
|
@ -15,11 +15,11 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
|
|
|
|
|
/// 获取干混机物料
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static List<MyNameValue> GetDryerMaterrial()
|
|
|
|
|
public static List<MyMCCombobox> GetDryerMaterrial()
|
|
|
|
|
{
|
|
|
|
|
var list = GetStockMaterrial(1);
|
|
|
|
|
list.RemoveAll(x => x.Id == 5);
|
|
|
|
|
list.RemoveAll(x => x.Id == 6);
|
|
|
|
|
list.RemoveAll(x => x.CmbValue == 5);
|
|
|
|
|
list.RemoveAll(x => x.CmbValue == 6);
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -27,10 +27,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
|
|
|
|
|
/// 获取糊化机物料
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static List<MyNameValue> GetSiloMaterrial()
|
|
|
|
|
public static List<MyMCCombobox> GetSiloMaterrial()
|
|
|
|
|
{
|
|
|
|
|
var list1 = GetStockMaterrial(1);
|
|
|
|
|
list1 = list1.Where(x => x.Id == 5 || x.Id == 6).ToList();
|
|
|
|
|
list1 = list1.Where(x => x.CmbValue == 5 || x.CmbValue == 6).ToList();
|
|
|
|
|
return list1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -50,16 +50,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static List<MyNameValue> GetStockMaterrial(int mtypId)
|
|
|
|
|
private static List<MyMCCombobox> GetStockMaterrial(int mtypId)
|
|
|
|
|
{
|
|
|
|
|
string sql = "select Id, Code, StockName, MTypeId, MTypeName, MId, MName, Remark from lj_stock_material";
|
|
|
|
|
|
|
|
|
|
var dataTable = DBHelp.GetTable(sql);
|
|
|
|
|
List<MyNameValue> ls = new List<MyNameValue>();
|
|
|
|
|
ls.Add(new MyNameValue()
|
|
|
|
|
List<MyMCCombobox> ls = new List<MyMCCombobox>();
|
|
|
|
|
ls.Add(new MyMCCombobox()
|
|
|
|
|
{
|
|
|
|
|
Id = -1,
|
|
|
|
|
Name = "请选择"
|
|
|
|
|
CmbValue = -1,
|
|
|
|
|
CmbDisplay = "请选择"
|
|
|
|
|
});
|
|
|
|
|
foreach (DataRow o in dataTable.Rows)
|
|
|
|
|
{
|
|
|
|
@ -68,10 +68,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
|
|
|
|
|
{
|
|
|
|
|
if (tableMTypeId == mtypId)
|
|
|
|
|
{
|
|
|
|
|
ls.Add(new MyNameValue()
|
|
|
|
|
ls.Add(new MyMCCombobox()
|
|
|
|
|
{
|
|
|
|
|
Id = (int)o["Id"],
|
|
|
|
|
Name = o["StockName"].ToString() + $"({o["MName"]})"
|
|
|
|
|
CmbValue = (int)o["Id"],
|
|
|
|
|
CmbDisplay = o["StockName"].ToString() + $"({o["MName"]})"
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|