public void AddCntLogicPro(string procedureCode = "") { //录入进控制点过程表 哪个产品在哪个工序哪个控制点正在进行 using (var context = new Model()) { //在检验任务表里根据产品出生证以及设备编号/有效性/手检类型/以及任务完成状态 按照时间排序获得优先加工任务 _currenChecktTask = context.C_CheckTask.FirstOrDefault(s => s.TaskState == (decimal?)CheckTaskState.NotOnline && s.IsAvailable == true && s.CheckType == (decimal?)CheckType.Manual && s.ProductBornCode == _productBornCode); var cBWuECntlLogicPro = new C_BWuE_CntlLogicPro { ProductBornCode = _productBornCode, ProcedureCode = "", ControlPointID = 4, Sort = "1", EquipmentCode = _equipmentCode, State = "1", StartTime = context.GetServerDate(), Remarks = "手检" }; context.C_BWuE_CntlLogicPro.Add(cBWuECntlLogicPro); context.SaveChanges(); } }
public void SetBindSource(object obj) { if (obj is C_CheckTask) { m_object = (C_CheckTask)obj; } }
public void SetBindSource(C_CheckTask cCheckTask) { using (var context = new Model()) { checkTask = cCheckTask; var aProductBase = context.A_ProductBase.FirstOrDefault(s => s.ProductCode == checkTask.ProductCode && s.IsAvailable == true); if (aProductBase != null) { var memoryStream = new MemoryStream(aProductBase.Image); var fromStream = Image.FromStream(memoryStream); } } }