Ejemplo n.º 1
0
        public RFFLPickingFrm(UserInfo userinfo,bool isrequiredid)
            : base(userinfo)
        {
            InitializeComponent();
            this.isrequiredid = isrequiredid;
            this.loginuser = userinfo;
            this.pick_req2 = new pick2_req.Utility();
            this.pick_req2.UtilityHeader.userid = this.loginuser.UserName;
            threadhelper = new ThreadHelper();
            threadhelper.AllWorkItemCompleted += new EventHandler(threadhelper_AllWorkItemCompleted);
            threadhelper.WorkItemCompleted += new EventHandler<WorkItemEventArgs>(threadhelper_WorkItemCompleted);
            threadhelper.WorkItemFailed += new EventHandler<WorkItemEventArgs>(threadhelper_WorkItemFailed);
            this.sotxt.Focus();
            dataBinding();

            if (this.isrequiredid)
            {
                this.Text = "区域拣货";
            }
            else {
                this.Text = "简易拣货";
            }
        }
Ejemplo n.º 2
0
        public void call_NSPRFFLOP01()
        {
            string errortxt = this.Vaildate();
            if (errortxt != string.Empty)
            {
                MessageBox.Show(errortxt);
                this.focusControl.Focus();
                return;
            }
            //this.Start();

            if (this.isrequiredid && this.dropidtxt.Text.Substring(0, 1).ToUpper() == "P")
            {
                this.pick_req2.UtilityHeader.cartontype = "PALLET";
            };
            RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.Utility,
                  enumRequestMethod.functionOperation, this.loginuser,
                  enumSendSysId.EXceed,
                  this.pick_req2);
            //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 2);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(requestmessage);
            string errormsg = Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(errormsg);
                this.sotxt.SetFocus();
                this.pick_req1 = null;
                //this.pick_req2 = null;
                this.pick_res1 = null;
                this.pick_res2 = null;
            }
            else
            {
                this.pick_res2 = Response.Deserialize<pick2_res.Utility>();
                if (this.pick_res2.UtilityHeader.rectype == "3")
                {
                    pick_req2 = new pick2_req.Utility();
                    this.pick_req2.UtilityHeader.userid = this.loginuser.UserName;
                    this.pick_req2.UtilityHeader.toloc = this.pick_res1.UtilityHeader.ToLoc;
                    this.pick_req2.UtilityHeader.pickdetailkey = this.pick_res1.UtilityHeader.PickDetailKey;
                    this.pick_req2.UtilityHeader.shiplabel = this.pick_res1.UtilityHeader.shiplabel;
                    this.pick_req2.UtilityHeader.storerkey = this.pick_res1.UtilityHeader.StorerKey;
                    this.pick_req2.UtilityHeader.lot = this.pick_res1.UtilityHeader.Lot;
                    this.pick_req2.UtilityHeader.fromloc = this.pick_res1.UtilityHeader.FromLoc;
                    this.pick_req2.UtilityHeader.qty = this.pick_res1.UtilityHeader.nothadpicked;
                    this.pick_req2.UtilityHeader.fromid = this.fromidtxt.GetText();
                    this.pick_req2.UtilityHeader.sku = this.skutxt.GetText();
                    this.pick_req2.UtilityHeader.dropid = this.dropidtxt.GetText();
                    this.pick_req2.UtilityHeader.loadcase = this.loadcasetxt.GetText();

                    //InvokeHelper.Invoke(this, "dataBinding", null);
                    this.dataBinding();
                    call_NSPRFFLREMQTY(this.sotxt.GetText(), this.fromidtxt.GetText(), this.skutxt.GetText());

                }
                else
                {
                    MessageBox.Show("拣货完成");
                    this.pick_req2 = new pick2_req.Utility();
                    this.pick_req2.UtilityHeader.userid = this.loginuser.UserName;
                    this.sotxt.SetText("");
                    InvokeHelper.Invoke(this, "dataBinding", null);
                    this.sotxt.SetFocus();
                    InvokeHelper.Invoke(this, "RestLabel", 0);

                }
            }
        }
Ejemplo n.º 3
0
        void threadhelper_WorkItemCompleted(object sender, WorkItemEventArgs e)
        {
            int tag = e.WorkItem.Tag;
            WorkItem item = e.WorkItem;
            string errormsg = item.Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(errormsg);
                this.sotxt.SetFocus();
                this.pick_req1 = null;
                //this.pick_req2 = null;
                this.pick_res1 = null;
                this.pick_res2 = null;
            }
            else
            {
                if (tag == 1)
                {
                    this.pick_res1 = e.WorkItem.Response.Deserialize<pick1_res.Utility>();
                    this.pick_req2.UtilityHeader.toloc = this.pick_res1.UtilityHeader.ToLoc;
                    this.pick_req2.UtilityHeader.pickdetailkey = this.pick_res1.UtilityHeader.PickDetailKey;
                    this.pick_req2.UtilityHeader.shiplabel = this.pick_res1.UtilityHeader.shiplabel;
                    this.pick_req2.UtilityHeader.storerkey = this.pick_res1.UtilityHeader.StorerKey;
                    this.pick_req2.UtilityHeader.lot = this.pick_res1.UtilityHeader.Lot;
                    this.pick_req2.UtilityHeader.fromloc = this.pick_res1.UtilityHeader.FromLoc;
                    this.pick_req2.UtilityHeader.qty = this.pick_res1.UtilityHeader.nothadpicked;
                    this.qtytxt.SetText(this.pick_res1.UtilityHeader.nothadpicked);
                    InvokeHelper.Invoke(this, "SetLabel", this.pick_res1);
                    this.qtytxt.SetFocus();
                }
                if (tag == 2)
                {
                    this.pick_res2 = e.WorkItem.Response.Deserialize<pick2_res.Utility>();
                    if (this.pick_res2.UtilityHeader.rectype == "3")
                    {
                        pick_req2 = new pick2_req.Utility();
                        this.pick_req2.UtilityHeader.userid = this.loginuser.UserName;
                        this.pick_req2.UtilityHeader.toloc = this.pick_res1.UtilityHeader.ToLoc;
                        this.pick_req2.UtilityHeader.pickdetailkey = this.pick_res1.UtilityHeader.PickDetailKey;
                        this.pick_req2.UtilityHeader.shiplabel = this.pick_res1.UtilityHeader.shiplabel;
                        this.pick_req2.UtilityHeader.storerkey = this.pick_res1.UtilityHeader.StorerKey;
                        this.pick_req2.UtilityHeader.lot = this.pick_res1.UtilityHeader.Lot;
                        this.pick_req2.UtilityHeader.fromloc = this.pick_res1.UtilityHeader.FromLoc;
                        this.pick_req2.UtilityHeader.qty = this.pick_res1.UtilityHeader.nothadpicked;
                        this.pick_req2.UtilityHeader.fromid = this.fromidtxt.GetText();
                        this.pick_req2.UtilityHeader.sku = this.skutxt.GetText();
                        this.pick_req2.UtilityHeader.dropid = this.dropidtxt.GetText();
                        this.pick_req2.UtilityHeader.loadcase = this.loadcasetxt.GetText();

                        InvokeHelper.Invoke(this, "dataBinding", null);
                        call_NSPRFFLREMQTY(this.sotxt.GetText(), this.fromidtxt.GetText(), this.skutxt.GetText());

                    }
                    else
                    {
                        MessageBox.Show("拣货完成");
                        this.pick_req2 = new pick2_req.Utility();
                        this.pick_req2.UtilityHeader.userid = this.loginuser.UserName;
                        this.sotxt.SetText("");
                        InvokeHelper.Invoke(this, "dataBinding", null);
                        this.sotxt.SetFocus();
                        InvokeHelper.Invoke(this, "RestLabel", 0);

                    }
                }
            }
        }