public static Utility Create(string userid, string taskdetailkey, string fromloc, string fromid, string toloc, string toid, string qty, string packkey, string uom, string reason)
        {
            Utility utility = new Utility();
            utility.UtilityHeader.taskdetailkey=taskdetailkey;
            utility.UtilityHeader.fromid=fromid;
            utility.UtilityHeader.fromloc=fromloc;
            utility.UtilityHeader.packkey=packkey;
            utility.UtilityHeader.qty=qty;
            utility.UtilityHeader.toid=toid;
            utility.UtilityHeader.toloc=toloc;
            utility.UtilityHeader.uom=uom;
            utility.UtilityHeader.userid=userid;
            utility.UtilityHeader.reason = reason;

            return utility;
        }
Пример #2
0
        public void call_NSPRFTPA02(Dictionary<string, tpa00_res.UtilityHeader> headerlist,string toloc,string reason)
        {
            callcount = 0;
            foreach (KeyValuePair<string, tpa00_res.UtilityHeader> keyval in headerlist)
            {
                callcount++;
                string packkey = packkeylist[keyval.Key];
                tpa00_res.UtilityHeader header = keyval.Value;
                this.tpa02req = tpa02_req.Utility.Create(this.loginuser.UserName, header.TaskDetailKey, header.FromLoc, header.FromId, toloc, header.FromId, header.Qty, packkey,"EA",reason);

                RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                      enumMessageType.Utility,
                      enumRequestMethod.functionOperation, this.loginuser,
                      enumSendSysId.EXceed,
                      this.tpa02req);
                ResponseMessage Response= ThreadHelper.Execute(requestmessage);
                string errormsg = Response.GetErrorMessage();
                if (errormsg != string.Empty)
                {
                    //this.Stop();
                    MessageBox.Show(errormsg);
                    break;
                }
                //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 200 + callcount++);
                //threadhelper.AddWorkItem(workitem);
            }

            DialogResult result = MessageBox.Show(string.Format("[{0}]个板上架完成,是否获取新任务?", callcount), "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
            this.CloseWindow(result);
        }
Пример #3
0
        private void submitsingle_Click(object sender, EventArgs e)
        {
            if (this.lpn.Text.Length == 0)
            {
                MessageBox.Show("请输入LPN");
                this.lpn.SetFocus();
                return;
            }

            if (!headerlist.ContainsKey(this.lpn.Text))
            {
                MessageBox.Show("LPN没有找到");
                this.lpn.SetFocus();
                return;
            }
            tpa00_res.UtilityHeader header = headerlist[this.lpn.Text];
            string packkey = packkeylist[header.FromId];
            this.tpa02req = tpa02_req.Utility.Create(this.loginuser.UserName, header.TaskDetailKey, header.FromLoc, header.FromId, this.ToLoc, header.FromId, header.Qty, packkey, "EA", this.Reason);

            RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.Utility,
                  enumRequestMethod.functionOperation, this.loginuser,
                  enumSendSysId.EXceed,
                  this.tpa02req);
            ResponseMessage response=  ThreadHelper.Execute(requestmessage);
            string errormsg = response.GetErrorMessage();
            if (errormsg != string.Empty)
            {

                MessageBox.Show(errormsg);

            }
            else
            {
                MessageBox.Show("上架完成");
                deleteitem(this.lpn.Text);
                headerlist.Remove(this.lpn.Text);
                this.lpn.Clean();
                this.toloc2.Clean();
                this.lpn.SetFocus();
            }
        }