Ejemplo n.º 1
0
        private void DoRange(FNZAIKOEntity zaiKo)
        {
            FNRANGEEntity range = DbAccess.GetRange(zaiKo.MADE_SECTION, zaiKo.MADE_LINE);

            if (range == null)
            {
                rangeLimitFromBox1.Text = "100";
                rangeLimitToBox1.Text   = "100";
            }
            else
            {
                rangeLimitFromBox1.Text = range.UNIT_WEIGHT_LOWER.ToString();
                rangeLimitToBox1.Text   = range.UNIT_WEIGHT_UPPER.ToString();
            }
        }
Ejemplo n.º 2
0
        private void DoRange(FNZAIKOEntity zaiKo)
        {
            FNRANGEEntity range = DbAccess.GetRange(zaiKo.MADE_SECTION, zaiKo.MADE_LINE);

            if (range == null)
            {
                itemWeightRangeLimitFromBox.Text = "100";
                itemWeightRangeLimitToBox.Text   = "100";
            }
            else
            {
                itemWeightRangeLimitFromBox.Text = range.STORAGE_LOWER.ToString();
                itemWeightRangeLimitToBox.Text   = range.STORAGE_UPPER.ToString();
            }
        }
Ejemplo n.º 3
0
        private void SetRange(decimal count)
        {
            decimal error = decimal.Round(count * 100 / planCount, 2);

            errorBox.Text = error.ToString();
            if (sijis == null || sijis.Count == 0)
            {
                msgBox.Text = "siji信息错误";
                WriteLog("SetRange时,siji信息错误");
                return;
            }

            if (sijis[0].SECTION == null || sijis[0].LINE == null)
            {
                msgBox.Text = "siji信息错误";
                WriteLog("SetRange时,siji信息错误");
                rangeLimitFromBox.Text = "100";
                rangeLimitToBox.Text   = "100";
                return;
            }

            FNRANGEEntity range = DbAccess.GetRange(GlobalAccess.TermNo);

            if (range == null)
            {
                rangeLimitFromBox.Text = "100";
                rangeLimitToBox.Text   = "100";
            }
            else
            {
                rangeLimitFromBox.Text = range.UNIT_WEIGHT_LOWER.ToString();
                rangeLimitToBox.Text   = range.UNIT_WEIGHT_UPPER.ToString();
            }

            if (error > Convert.ToDecimal(rangeLimitToBox.Text) || error < Convert.ToDecimal(rangeLimitFromBox.Text))
            {
                OutOfRangeWarning frm = new OutOfRangeWarning("产品重量", errorBox.Text, rangeLimitFromBox.Text, rangeLimitToBox.Text);
                frm.ShowDialog(this);
                msgBox.Text = "超出范围";
            }
            else
            {
                msgBox.Text = string.Empty;
            }
        }