Exemplo n.º 1
0
        //配方结束
        private void End_Event(object sender, EventArgs e)
        {
            Golbal.CurrentAction = "等待机台请求";
            Thread.Sleep(2000);//休眠两秒

            if (Golbal.CurrentFormulaModel.CompleteCylinderNum + 1 >= Golbal.CurrentFormulaModel.CylinderNum)
            {
                Golbal.CurrentFormulaModel.CompleteCylinderNum = Golbal.CurrentFormulaModel.CylinderNum;
                Golbal.MyQueueList.RemoveAt(0);
            }
            else
            {
                Golbal.CurrentFormulaModel.CompleteCylinderNum++;
            }

            lblCompleteQuantity.LableShow(Golbal.CurrentFormulaModel.CompleteCylinderNum.ToString());
            //添加完成记录
            DSW_FormulaDistributionModel formulaDistributionModel = new DSW_FormulaDistributionModel();

            formulaDistributionModel.BarCode      = Golbal.CurrentFormulaModel.BarCode;
            formulaDistributionModel.PotName      = Golbal.CurrentPotName;
            formulaDistributionModel.DSQuantity   = Golbal.CurrentFormulaModel.Quantity / Golbal.CurrentFormulaModel.CylinderNum;
            formulaDistributionModel.RealQuantity = decimal.Parse(Golbal.ParamClass.配送总量实际);
            formulaDistributionModel.RecordTime   = DateTime.Now;
            formulaDistributionDAL.Add(formulaDistributionModel);
            Golbal.DSStep    = 0;
            Golbal.WaterStep = 0;

            tMain.Start();
        }
Exemplo n.º 2
0
        public bool Add(DSW_FormulaDistributionModel model)
        {
            try
            {
                var db = Database.Open();

                db.DSW_FormulaDistributions.Insert(model);
                return(true);
            }
            catch {
                return(false);
            }
        }
Exemplo n.º 3
0
        //配方结束
        private void End_Event(object sender, EventArgs e)
        {
            Golbal.WashingCurrentAction = "等待机台请求";
            //Thread.Sleep(2000);//休眠两秒


            Golbal.MyWashingList.Remove(Golbal.CurrentWashingaModel);

            //添加完成记录
            DSW_FormulaDistributionModel formulaDistributionModel = new DSW_FormulaDistributionModel();

            formulaDistributionModel.BarCode      = Golbal.CurrentWashingaModel.BarCode;
            formulaDistributionModel.PotName      = Golbal.WashingCurrentPotName;
            formulaDistributionModel.DSQuantity   = Golbal.CurrentWashingaModel.MaterialQuantity + Golbal.CurrentWashingaModel.CabientWaterQuantity;
            formulaDistributionModel.RealQuantity = decimal.Parse(Golbal.ParamClass.水洗助剂配送实际) + decimal.Parse(Golbal.ParamClass.水洗机台放水实际);
            formulaDistributionModel.RecordTime   = DateTime.Now;
            formulaDistributionDAL.Add(formulaDistributionModel);
            Golbal.WashingDSStep    = 0;
            Golbal.WashingWaterStep = 0;

            tMain.Start();
        }