示例#1
0
        private void btnSure_Click(object sender, EventArgs e)
        {
            decimal target = decimal.Parse(txtTarget.Text);

            if (target == 0)
            {
                MessageBox.ShowTip("目标量应大于零");
                return;
            }
            this.DialogResult = DialogResult.OK;

            DS_DSMaterialModel materialModel = materialDAL.GetMaterialByCode(combMaterial.SelectedValue.ToString());

            currentMaterial.MaterialId       = materialModel.Id.ToString();
            currentMaterial.MaterialName     = materialModel.Name;
            currentMaterial.MaterialCode     = materialModel.Code;
            currentMaterial.MaterialQuantity = decimal.Parse(target.ToString("0.000"));
            currentMaterial.Price            = materialModel.Price.Value;
            currentMaterial.Unit             = materialModel.Unit;
        }
示例#2
0
 //达到机台放水百分比后开始配送助剂
 private void PercentFinishEvent(object sender, EventArgs e)
 {
     if (Golbal.CurrentWashingaModel.MaterialQuantity > 0)
     {
         DS_DSMaterialModel materialmodel = MaterialList.Find(s => s.Code == "80");
         DsMaterial         dsMaterial    = new DsMaterial();
         dsMaterial.MaterialId       = materialmodel.Id.ToString();
         dsMaterial.MaterialCode     = materialmodel.Code;
         dsMaterial.MaterialName     = materialmodel.Name;
         dsMaterial.MaterialQuantity = Golbal.CurrentWashingaModel.MaterialQuantity;
         dsMaterial.Unit             = materialmodel.Unit;
         dsMaterial.Price            = materialmodel.Price.Value;
         washingmaterialDS.Excute(Golbal.ParamClass, Golbal.WashingCurrentPotCode, dsMaterial); //配送第一种助剂
         Golbal.WashingDSStep = 1;                                                              //开始配送助剂
     }
     else
     {
         Golbal.WashingDSStep = 2;//跳过配送助剂完成
     }
 }