Exemplo n.º 1
0
        private void AddCntLogicPro()
        {
            //添加控制点过程信息
            using (var context = new Model())
            {
                var cBWuECntlLogicPro = new C_BWuE_CntlLogicPro();
                cBWuECntlLogicPro.ProductBornCode = _productBornCode;
                cBWuECntlLogicPro.ProcedureCode   = _cProductProcessing.ProcedureCode;
                cBWuECntlLogicPro.ControlPointID  = 5;
                cBWuECntlLogicPro.Sort            = "2";
                cBWuECntlLogicPro.EquipmentCode   = "2";
                cBWuECntlLogicPro.State           = "1";
                cBWuECntlLogicPro.StartTime       = DateTime.Now;

                context.C_BWuE_CntlLogicPro.Add(cBWuECntlLogicPro);
                context.SaveChanges();
            }
        }
Exemplo n.º 2
0
        public void AddCntLogicPro()
        {
            //录入进控制点过程表  哪个产品在哪个工序哪个控制点正在进行
            using (var context = new Model())
            {
                var cBWuECntlLogicPro = new C_BWuE_CntlLogicPro();
                cBWuECntlLogicPro.ProductBornCode = _productBornCode;
                cBWuECntlLogicPro.ProcedureCode   = _currentTask.ProcedureCode;
                cBWuECntlLogicPro.ControlPointID  = 7;
                cBWuECntlLogicPro.Sort            = 1.ToString();
                cBWuECntlLogicPro.EquipmentCode   = "4";
                cBWuECntlLogicPro.State           = 1.ToString();
                cBWuECntlLogicPro.StartTime       = context.GetServerDate();

                context.C_BWuE_CntlLogicPro.Add(cBWuECntlLogicPro);
                context.SaveChanges();
            }
        }
Exemplo n.º 3
0
        private void AddCntLogicProOffline(string remark = "")
        {
            using (var context = new Model())
            {
                //在产品加工过程表中根据产品出生证  获取元数据
                _cProductProcessing = context.C_ProductProcessing.FirstOrDefault(s => s.ProductBornCode == ProductIDTxt.Text.Trim());
                var cBWuECntlLogicPro = new C_BWuE_CntlLogicPro
                {
                    ProductBornCode = ProductIDTxt.Text.Trim(),
                    ProcedureCode   = _cProductProcessing.ProcedureCode,
                    ControlPointID  = 8,
                    Sort            = "2",
                    EquipmentCode   = _equipmentCode,
                    State           = "1",
                    StartTime       = context.GetServerDate(),
                    Remarks         = remark
                };

                context.Entry(cBWuECntlLogicPro).State = EntityState.Added;
                context.SaveChanges();
            }
        }