You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
654 lines
25 KiB
654 lines
25 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Globalization;
|
|
using System.Net.NetworkInformation;
|
|
using System.Windows.Data;
|
|
using System.Windows.Media;
|
|
|
|
namespace SSWMS.Common
|
|
{
|
|
public class SystemCode
|
|
{
|
|
public class BindingConverter : IValueConverter
|
|
{
|
|
public DataTable BindingDataTable = null;
|
|
public BindingConverter(DataTable dt)
|
|
{
|
|
BindingDataTable = dt;
|
|
}
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
DataRow[] adr = null;
|
|
if (value is string)
|
|
{
|
|
adr = BindingDataTable.Select(string.Format("VALUE='{0}'", value));
|
|
}
|
|
else if (value is int)
|
|
{
|
|
adr = BindingDataTable.Select(string.Format("VALUE={0}", value));
|
|
}
|
|
return adr != null && adr.Length > 0 ? adr[0]["NAME"].ToString() : string.Empty;
|
|
}
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
|
|
public class APPLY_STATUS
|
|
{
|
|
public const int Waiting = 0;
|
|
public const int Read = 1;
|
|
public const int Finish = 2;
|
|
public const int Error = 3;
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
dt.Rows.Add("等待执行", Waiting);
|
|
dt.Rows.Add("执行中", Read);
|
|
dt.Rows.Add("成功", Finish);
|
|
dt.Rows.Add("失败", Error);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class APPLY_TYPE
|
|
{
|
|
public const int ScanIn = 1;
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
dt.Rows.Add("扫码入库", ScanIn);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class CELL_MODEL
|
|
{
|
|
public const string Low = "1";
|
|
//public const string High = "2";
|
|
public const string Max = "1";
|
|
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("低货位", Low);
|
|
//dt.Rows.Add("高货位", High);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class CELL_TYPE
|
|
{
|
|
public const string Cell = "Cell";
|
|
public const string Ping = "Ping";
|
|
public const string Station = "Station";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("立库货位", Cell);
|
|
//dt.Rows.Add("平库货位", Ping);
|
|
dt.Rows.Add("暂存区", Station);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class CONTROL_STATUS
|
|
{
|
|
public const int Waiting = 0;
|
|
public const int Readed = 7;
|
|
public const int Runing = 10;
|
|
public const int DeviceRuning = 11;
|
|
public const int DuplicateDelete = 250;
|
|
public const int ExceptionDelete = 251;
|
|
public const int Delete = 900;
|
|
public const int ExceptionIn = 970;
|
|
public const int ExceptionOut = 980;
|
|
public const int ExceptionComplete = 990;
|
|
public const int Complete = 999;
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
dt.Rows.Add("等待执行", Waiting);
|
|
dt.Rows.Add("任务获取", Readed);
|
|
dt.Rows.Add("执行中", Runing);
|
|
//dt.Rows.Add("条码重复", DuplicateDelete);
|
|
//dt.Rows.Add("异常删除", ExceptionDelete);
|
|
dt.Rows.Add("删除", Delete);
|
|
//dt.Rows.Add("堆垛机放货重", ExceptionIn);
|
|
//dt.Rows.Add("堆垛机取货空", ExceptionOut);
|
|
//dt.Rows.Add("异常完成", ExceptionComplete);
|
|
dt.Rows.Add("完成", Complete);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class CONTROL_TYPE
|
|
{
|
|
public const int InCell = 1;
|
|
public const int OutCell = 2;
|
|
public const int MoveCell = 3;
|
|
public const int MoveStation = 4;
|
|
public const int Fire = 5;
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
dt.Rows.Add("立库入库", InCell);
|
|
dt.Rows.Add("立库出库", OutCell);
|
|
dt.Rows.Add("立库移库", MoveCell);
|
|
dt.Rows.Add("输送", MoveStation);
|
|
//dt.Rows.Add("火警", Fire);
|
|
return dt;
|
|
}
|
|
public static DataTable GetRouteDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
dt.Rows.Add("入库", InCell);
|
|
dt.Rows.Add("出库", OutCell);
|
|
dt.Rows.Add("移库", MoveCell);
|
|
dt.Rows.Add("输送", MoveStation);
|
|
return dt;
|
|
}
|
|
public static int GetControlType(string sManageType)
|
|
{
|
|
int iControlType = 0;
|
|
switch (sManageType)
|
|
{
|
|
case MANAGE_TYPE.InCell:
|
|
iControlType = InCell;
|
|
break;
|
|
case MANAGE_TYPE.OutCell:
|
|
case MANAGE_TYPE.OutPick:
|
|
iControlType = OutCell;
|
|
break;
|
|
case MANAGE_TYPE.MoveCell:
|
|
iControlType = MoveCell;
|
|
break;
|
|
case MANAGE_TYPE.MoveStation:
|
|
iControlType = MoveStation;
|
|
break;
|
|
}
|
|
return iControlType;
|
|
}
|
|
}
|
|
|
|
public class FLAG
|
|
{
|
|
public const string Disable = "0";
|
|
public const string Enable = "1";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("是", Enable);
|
|
dt.Rows.Add("否", Disable);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class FLOW_TYPE
|
|
{
|
|
public const string FlowPlan = "FLOW_PLAN";
|
|
public const string FlowManage = "FLOW_MANAGE";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("计划流程", FlowPlan);
|
|
dt.Rows.Add("任务流程", FlowManage);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class FORK_TYPE
|
|
{
|
|
public const string Normal = "Normal";
|
|
public const string CellFar = "CellFar";
|
|
public const string CellNear = "CellNear";
|
|
public const string ForkFar = "ForkFar";
|
|
public const string ForkNear = "ForkNear";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("普通", Normal);
|
|
dt.Rows.Add("远深货位", CellFar);
|
|
dt.Rows.Add("近深货位", CellNear);
|
|
dt.Rows.Add("远叉货位", ForkFar);
|
|
dt.Rows.Add("近叉货位", ForkNear);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class GOODS_CLASS
|
|
{
|
|
public const string Stock = "1";
|
|
public const string Goods = "11";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("物料", Goods);
|
|
//dt.Rows.Add("托盘", Stock);
|
|
return dt;
|
|
}
|
|
public static DataTable GetGoodsDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("物料", Goods);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class GOODS_ID
|
|
{
|
|
public const int Stock = 1;
|
|
public const int MaxStock = 10;
|
|
public const int MultiGoods = 100;
|
|
public const int Goods = 101;
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
dt.Rows.Add("物料", Goods);
|
|
return dt;
|
|
}
|
|
public static DataTable GetStockDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeInt32);
|
|
return dt;
|
|
}
|
|
public static int GetGoodsID(string sStockBarcode)
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
public class LANGUAGE
|
|
{
|
|
public const string Chinese = "Default";
|
|
public const string English = "en-US";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("简体中文", Chinese);
|
|
dt.Rows.Add("English", English);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class MANAGE_STATUS
|
|
{
|
|
public const string Send = "Send";
|
|
public const string Waiting = "Waiting";
|
|
public const string Executing = "Executing";
|
|
public const string Error = "Error";
|
|
public const string Interface = "Interface";
|
|
public const string Complete = "Complete";
|
|
public const string Delete = "Delete";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("等待下达", Send);
|
|
dt.Rows.Add("等待执行", Waiting);
|
|
dt.Rows.Add("执行中", Executing);
|
|
dt.Rows.Add("调用接口", Interface);
|
|
dt.Rows.Add("异常", Error);
|
|
dt.Rows.Add("完成", Complete);
|
|
dt.Rows.Add("删除", Delete);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class MANAGE_TYPE
|
|
{
|
|
public const string InCell = "InCell";
|
|
public const string OutCell = "OutCell";
|
|
public const string OutPick = "OutPick";
|
|
public const string MoveCell = "MoveCell";
|
|
public const string InPing = "InPing";
|
|
public const string OutPing = "OutPing";
|
|
public const string InStation = "InStation";
|
|
public const string OutStation = "OutStation";
|
|
public const string MoveStation = "MoveStation";
|
|
//public const string Check = "Check";
|
|
//public const string Change = "Change";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("立库入库", InCell);
|
|
dt.Rows.Add("立库出库", OutCell);
|
|
//dt.Rows.Add("盘点出库", OutPick);
|
|
dt.Rows.Add("立库移库", MoveCell);
|
|
//dt.Rows.Add("平库入库", InPing);
|
|
//dt.Rows.Add("平库出库", OutPing);
|
|
//dt.Rows.Add("暂存入库", InStation);
|
|
//dt.Rows.Add("暂存出库", OutStation);
|
|
//dt.Rows.Add("输送", MoveStation);
|
|
return dt;
|
|
}
|
|
|
|
public static DataTable GetWareHouseDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("立库入库", InCell);
|
|
dt.Rows.Add("立库出库", OutCell);
|
|
//dt.Rows.Add("盘点出库", OutPick);
|
|
dt.Rows.Add("立库移库", MoveCell);
|
|
//dt.Rows.Add("输送", MoveStation);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class OPERATOR
|
|
{
|
|
public const string EqualTo = "=";
|
|
public const string NotEqualTo = "<>";
|
|
public const string GreaterThanOrEqualTo = ">=";
|
|
public const string GreaterThan = ">";
|
|
public const string LessThanOrEqualTo = "<=";
|
|
public const string LessThan = "<";
|
|
public const string IsNull = "IS NULL";
|
|
public const string IsNotNull = "IS NOT NULL";
|
|
public const string Like = "LIKE";
|
|
public const string NotLike = "NOT LIKE";
|
|
public const string Between = "BETWEEN";
|
|
public const string And = "AND";
|
|
public const string Or = "OR";
|
|
public static DataTable GetCompareDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("等于", EqualTo);
|
|
dt.Rows.Add("不等于", NotEqualTo);
|
|
dt.Rows.Add("大于等于", GreaterThanOrEqualTo);
|
|
dt.Rows.Add("大于", GreaterThan);
|
|
dt.Rows.Add("小于等于", LessThanOrEqualTo);
|
|
dt.Rows.Add("小于", LessThan);
|
|
dt.Rows.Add("为空", IsNull);
|
|
dt.Rows.Add("不为空", IsNotNull);
|
|
dt.Rows.Add("类似", Like);
|
|
dt.Rows.Add("不类似", NotLike);
|
|
dt.Rows.Add("范围", Between);
|
|
return dt;
|
|
}
|
|
public static DataTable GetLogicalDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("并且", And);
|
|
dt.Rows.Add("或者", Or);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class PLAN_STATUS
|
|
{
|
|
public const string Waiting = "Waiting";
|
|
public const string Executing = "Executing";
|
|
public const string Auto = "Auto";
|
|
public const string Pause = "Pause";
|
|
public const string Error = "Error";
|
|
public const string Interface = "Interface";
|
|
public const string Complete = "Complete";
|
|
public const string Delete = "Delete";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("等待执行", Waiting);
|
|
dt.Rows.Add("执行中", Executing);
|
|
dt.Rows.Add("自动出库", Auto);
|
|
dt.Rows.Add("暂停", Pause);
|
|
dt.Rows.Add("调用接口", Interface);
|
|
dt.Rows.Add("异常", Error);
|
|
dt.Rows.Add("完成", Complete);
|
|
dt.Rows.Add("删除", Delete);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class PLAN_TYPE
|
|
{
|
|
public const string PlanIn = "PlanIn";
|
|
public const string PlanOut = "PlanOut";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
//dt.Rows.Add("计划入库", PlanIn);
|
|
dt.Rows.Add("计划出库", PlanOut);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class RELATION_TYPE
|
|
{
|
|
public const string User = "User";
|
|
public const string Menu = "Menu";
|
|
public const string Flow = "Flow";
|
|
public const string Warehouse = "Warehouse";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("用户", User);
|
|
dt.Rows.Add("菜单", Menu);
|
|
dt.Rows.Add("流程", Flow);
|
|
dt.Rows.Add("仓库", Warehouse);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class STOCK_HEIGHT
|
|
{
|
|
public const string Low = "1";
|
|
public const string High = "2";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("高托", High);
|
|
dt.Rows.Add("低托", Low);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class STOCK_SIZE
|
|
{
|
|
public const string Rectangle = "1";
|
|
public const string Square = "2";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("方托", Square);
|
|
dt.Rows.Add("长托", Rectangle);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class WAREHOUSE_CODE
|
|
{
|
|
public const string Warehouse = "1";
|
|
public const string Ping = "2";
|
|
public static DataTable GetCommonDataTable()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("立体仓库", Warehouse);
|
|
//dt.Rows.Add("平库仓库", Ping);
|
|
return dt;
|
|
}
|
|
}
|
|
|
|
public class WH_CELL_CODE
|
|
{
|
|
public const string GroupDeviceCode = "99999";
|
|
public static string[] InBehind = new string[] { "126902", "127002" };
|
|
public static string[] OutBehind = new string[] { "126901", "127001" };
|
|
|
|
public static DataTable GetCellCodeIn()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("1 巷道左", "130003");
|
|
dt.Rows.Add("3 巷道右", "130206");
|
|
dt.Rows.Add("8 巷道右", "130706");
|
|
dt.Rows.Add("12 巷道右", "131106");
|
|
dt.Rows.Add("16 巷道右", "19014");
|
|
dt.Rows.Add("平库左", "126902");
|
|
dt.Rows.Add("平库右", "127002");
|
|
dt.Rows.Add("126501 制毡区", "19003");
|
|
dt.Rows.Add("126601 制毡区", "19004");
|
|
dt.Rows.Add("126701 制毡区", "19005");
|
|
dt.Rows.Add("126801 制毡区", "19006");
|
|
dt.Rows.Add("19015 短切毡", "19015");
|
|
dt.Rows.Add("19016 短切毡", "19016");
|
|
dt.Rows.Add("19017 短切毡", "19017");
|
|
dt.Rows.Add("19018 短切毡", "19018");
|
|
return dt;
|
|
}
|
|
|
|
public static DataTable GetCellCodeOut()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
dt.Rows.Add("1 巷道左", "120003");
|
|
dt.Rows.Add("1 巷道右", "120008");
|
|
dt.Rows.Add("2 巷道左", "120103");
|
|
dt.Rows.Add("2 巷道右", "120108");
|
|
dt.Rows.Add("3 巷道左", "120203");
|
|
dt.Rows.Add("3 巷道右", "120208");
|
|
dt.Rows.Add("4 巷道左", "120303");
|
|
dt.Rows.Add("4 巷道右", "120308");
|
|
dt.Rows.Add("5 巷道左", "120403");
|
|
dt.Rows.Add("5 巷道右", "120408");
|
|
dt.Rows.Add("6 巷道左", "120503");
|
|
dt.Rows.Add("6 巷道右", "120508");
|
|
dt.Rows.Add("7 巷道左", "120603");
|
|
dt.Rows.Add("7 巷道右", "120608");
|
|
dt.Rows.Add("8 巷道左", "120703");
|
|
dt.Rows.Add("8 巷道右", "120708");
|
|
dt.Rows.Add("9 巷道左", "120803");
|
|
dt.Rows.Add("9 巷道右", "120808");
|
|
dt.Rows.Add("10 巷道左", "120903");
|
|
dt.Rows.Add("10 巷道右", "120908");
|
|
dt.Rows.Add("11 巷道左", "121003");
|
|
dt.Rows.Add("11 巷道右", "121008");
|
|
dt.Rows.Add("12 巷道左", "121103");
|
|
dt.Rows.Add("12 巷道右", "121108");
|
|
dt.Rows.Add("14 巷道左", "121311");
|
|
dt.Rows.Add("14 巷道右", "121312");
|
|
dt.Rows.Add("15 巷道左", "121411");
|
|
dt.Rows.Add("15 巷道右", "121412");
|
|
dt.Rows.Add("16 巷道左", "121511");
|
|
dt.Rows.Add("16 巷道右", "121512");
|
|
dt.Rows.Add("18 巷道左", "121809");
|
|
dt.Rows.Add("18 巷道右", "121811");
|
|
dt.Rows.Add("平库左", "126901");
|
|
dt.Rows.Add("平库右", "127001");
|
|
return dt;
|
|
}
|
|
|
|
public static DataTable GetCellCodeOutStock()
|
|
{
|
|
DataTable dt = new DataTable();
|
|
dt.Columns.Add("NAME", ConstCode.TypeString);
|
|
dt.Columns.Add("VALUE", ConstCode.TypeString);
|
|
return dt;
|
|
}
|
|
|
|
public static string GetLineDeviceCode(string sStartCellCode)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
}
|
|
|
|
public class WH_CELL_COLOR
|
|
{
|
|
public static Color Full = Colors.Orange;
|
|
public static Color Stock = Colors.RoyalBlue;
|
|
public static Color Nohave = Colors.DarkGray;
|
|
public static Color Exception = Colors.Red;
|
|
public static Color[] CellColors = new Color[] { Full, Nohave, Exception };
|
|
public static Color GetColor(WH_CELL wc)
|
|
{
|
|
if (wc.CELL_FLAG == FLAG.Disable)
|
|
{
|
|
return Exception;
|
|
}
|
|
else if (wc.STORAGE_ID == 0)
|
|
{
|
|
return Nohave;
|
|
}
|
|
else if (wc.GOODS_ID < GOODS_ID.MaxStock)
|
|
{
|
|
return Stock;
|
|
}
|
|
else
|
|
{
|
|
return Full;
|
|
}
|
|
}
|
|
}
|
|
|
|
public class ConstCode
|
|
{
|
|
public const int AdminUserID = 1;
|
|
public const int AdminRoleID = 1;
|
|
public const int DatabaseWarehouse = 1;
|
|
public const int DatabaseERP = 2;
|
|
public const int CommonParentID = 1;
|
|
public const int Success = 0;
|
|
public const int ServiceStart = 10001;
|
|
public const int ServerStart = 10002;
|
|
public const string DefaultOperator = "WMS";
|
|
public static readonly Type TypeString = Type.GetType("System.String");
|
|
public static readonly Type TypeInt32 = Type.GetType("System.Int32");
|
|
}
|
|
}
|
|
}
|