public static Utility Create(string movableUnit)
 {
     Utility utility = new Utility();
     utility.UtilityHeader.MovableUnit = movableUnit;
     return utility;
 }
Ejemplo n.º 2
0
        public void NSPRFRL021_1()
        {
            //this.Start();
            this.RL021req = RL021_req.Utility.Create(this.movableunit.Text);

            RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.Utility,
                  enumRequestMethod.functionOperation, this.loginuser,
                  enumSendSysId.EXceed,
                  this.RL021req);
            //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 1);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(requestmessage);
            string errormsg = Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(errormsg);
                this.RL021res = null;
                this.RL02req = null;
            }
            else
            {

                this.RL021res = Response.Deserialize<RL021_res.Utility>();
                //this.sku.SetText(this.RL021res.UtilityHeader.Sku);
                //this.sku.SetText(this.RL021res.UtilityHeader.skusum);
                //this.fromloc.SetText(this.RL021res.UtilityHeader.FromLoc);
                //this.desc.SetText(this.RL021res.UtilityHeader.Descr);
                this.toloc1.SetText(this.RL021res.UtilityHeader.ToLoc);
                //this.totagtxt.SetText(this.RL021res.UtilityHeader.totag);
                //DialogResult result = MessageBox.Show("拣货完成,是否获取新任务?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                //InvokeHelper.Invoke(this, "CloseWindow", result);

            }
        }
Ejemplo n.º 3
0
        public void NSPRFRL021_1()
        {
            string errormsg = string.Empty;
            string errortxt = this.Vaildate();
            if (errortxt != string.Empty)
            {
                MessageBox.Show(errortxt);
                this.focusControl.Focus();
                return;
            }

            //this.submitbtn.Enabled = false;
            //this.Start();
            string[] list = getdropidlist(this.dropid.Text);
            if (list == null || list.Length == 0)
                return;
            foreach (string pid in list)
            {
                this.RL021req = RL021_req.Utility.Create(pid);

                RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                      enumMessageType.Utility,
                      enumRequestMethod.functionOperation, this.LoginUser,
                      enumSendSysId.EXceed,
                      this.RL021req);
                //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 2+i);
                //threadhelper.AddWorkItem(workitem);
                ResponseMessage Response = ThreadHelper.Execute(requestmessage);
                errormsg = Response.GetErrorMessage();
                if (errormsg != string.Empty)
                {
                    MessageBox.Show(errormsg);
                    return;

                }
                RL021_res.Utility R021res = Response.Deserialize<RL021_res.Utility>();

                this.NSPRFRL02(this.RL021req.UtilityHeader.MovableUnit, R021res.UtilityHeader, 0);

            }

            if (string.IsNullOrEmpty(errormsg))
            {
                deleteitem(this.dropid.Text);
                this.gridbinding(this.orderlist);
                this.countlable.Text = string.Format("总数: {0}", this.orderlist.Count);

                if (this.orderlist.Count == 0)
                {
                    this.clean();
                    MessageBox.Show("订单拣货完成", "提示");
                }
                else
                {
                    MessageBox.Show("拣货完成", "提示");
                }

            }
        }
Ejemplo n.º 4
0
        public void NSPRFRL021()
        {
            this.Start();
            this.RL021req = RL021_req.Utility.Create(this.movableunit.Text);

            RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.Utility,
                  enumRequestMethod.functionOperation, this.loginuser,
                  enumSendSysId.EXceed,
                  this.RL021req);
            RequestWorkItem workitem = new RequestWorkItem(requestmessage, 1);
            threadhelper.AddWorkItem(workitem);
        }
Ejemplo n.º 5
0
        public void NSPRFRL021()
        {
            string errormsg = string.Empty;
            string errortxt = this.Vaildate();
            if (errortxt != string.Empty)
            {
                MessageBox.Show(errortxt);
                this.focusControl.Focus();
                return;
            }
            this.submitbtn.Enabled = false;
            //this.Start();
            for (int i = 0; i < this.orderlist.Count; i++)
            {
                //string line = this.droplist.Items[i].ToString();
                //string[] temp = line.Split(new char[] { ' ' });
                string dropid = orderlist[i].Dropid;
                this.RL021req = RL021_req.Utility.Create(dropid);

                RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                      enumMessageType.Utility,
                      enumRequestMethod.functionOperation, this.LoginUser,
                      enumSendSysId.EXceed,
                      this.RL021req);
                //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 2+i);
                //threadhelper.AddWorkItem(workitem);
               ResponseMessage Response = ThreadHelper.Execute(requestmessage);
               errormsg = Response.GetErrorMessage();
              if (errormsg != string.Empty)
              {
                  MessageBox.Show(errormsg);
                  break;

              }
              RL021_res.Utility R021res = Response.Deserialize<RL021_res.Utility>();
              this.NSPRFRL02(this.RL021req.UtilityHeader.MovableUnit, R021res.UtilityHeader, 0);

            }
            this.clean();
            if (string.IsNullOrEmpty(errormsg))
            {
                MessageBox.Show("拣货完成", "提示");
            }
            this.submitbtn.Enabled = true;
        }