public static string GetPrintList(string data)
{
string[] _data = data.Split(',');
string Order_No = _data[0].ToString();
string val = _data[1].ToString();
var context = LEDAO.APIGateWay.GetEntityContext();
var var = (from b in context.V_WorkOrder_Product where b.order_no == Order_No select b).ToList();
if (var.Count() > 0)
{
V_WorkOrder_Product vtmp = new V_WorkOrder_Product();
Type t = var[0].GetType();
FieldInfo[] fields = t.GetFields(BindingFlags.NonPublic | BindingFlags.Instance);
foreach (FieldInfo field in fields)
{
if (field.Name == ("_" + val.ToLower().ToString()))
{
if (field.Name != "_input_time")
{
return field.GetValue(var[0]).ToString();
}
else
{
return DateTime.Now.ToString("yyyy-MM-dd hh:mm");
}
}
}
}
return null;
}