示例#1
0
        public Golbal()
        {
            _intervalwater       = Convert.ToDecimal(System.Configuration.ConfigurationManager.AppSettings["IntervalWater"].ToString()); //间隔水量
            _cleanwater          = decimal.Parse(System.Configuration.ConfigurationManager.AppSettings["CleanWater"].ToString());        //清洗水量
            _endwater            = decimal.Parse(System.Configuration.ConfigurationManager.AppSettings["EndWater"].ToString());          //末端水量
            _serverIP            = System.Configuration.ConfigurationManager.AppSettings["ServerIP"].ToString();                         //服务器IP
            _localIP             = System.Configuration.ConfigurationManager.AppSettings["LocalIP"].ToString();                          //本地IP
            _perSum              = decimal.Parse(System.Configuration.ConfigurationManager.AppSettings["PerSum"].ToString());            //末端水量
            ParamClass           = ParamClass.Instance;
            CurrentAction        = "等待机台请求";
            WashingCurrentAction = "等待机台请求";
            DS_PotDAL potDAL = new DS_PotDAL();

            potList = potDAL.GetPotList();//获取所有缸信息
            DS_DSMaterialDAL DAL = new DS_DSMaterialDAL();

            WaterModel = DAL.GetMaterialByCode("99");
        }
示例#2
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;
        }