コード例 #1
0
 public RFTPA00Frm(UserInfo loginuser, task_res.Utility task_res1)
     : base(loginuser)
 {
     InitializeComponent();
     this.task_res1 = task_res1;
     this.loginuser = loginuser;
     SetValue();
     threadhelper = new ThreadHelper();
     threadhelper.AllWorkItemCompleted += new EventHandler(threadhelper_AllWorkItemCompleted);
     threadhelper.WorkItemCompleted += new EventHandler<WorkItemEventArgs>(threadhelper_WorkItemCompleted);
     threadhelper.WorkItemFailed += new EventHandler<WorkItemEventArgs>(threadhelper_WorkItemFailed);
     this.fromloc.Focus();
 }
コード例 #2
0
        public RFTPK01CFrm(UserInfo loginuser,task_res.Utility task_res1)
            : base(loginuser)
        {
            InitializeComponent();

            this.task_res1 = task_res1;
            this.loginuser = loginuser;
            SetValue();
            Create(task_res1);
            dataBinding();
            threadhelper = new ThreadHelper();
            threadhelper.AllWorkItemCompleted += new EventHandler(threadhelper_AllWorkItemCompleted);
            threadhelper.WorkItemCompleted += new EventHandler<WorkItemEventArgs>(threadhelper_WorkItemCompleted);
            threadhelper.WorkItemFailed += new EventHandler<WorkItemEventArgs>(threadhelper_WorkItemFailed);
            this.fromidtxt.Focus();
            this.cartontype.SelectedIndex = 1;
            this.taskKey = task_res1.UtilityHeader.TaskDetailKey;
            this.idlabel.Text = string.Format("ID库存/拣货后库存:{0}/{1}", task_res1.UtilityHeader.idqty, task_res1.UtilityHeader.theoryidqty);
            this.loclabel.Text = string.Format("LOC库存/拣货后库存:{0}/{1}", task_res1.UtilityHeader.locqty, task_res1.UtilityHeader.theorylocqty);
        }
コード例 #3
0
        public void NSPRFTM01(string area, string taskcode)
        {
            //this.Start();
            this.task_req1 = task_req.Utility.CreateInstance(area, taskcode);
            this.task_req1.UtilityHeader.userid = this.loginuser.UserName;
            //UserInfo admin = new UserInfo();
            //admin.UserName = "******";
            //admin.Password = "******";
            RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.Utility,
                  enumRequestMethod.functionOperation, this.loginuser,
                  enumSendSysId.EXceed,
                  this.task_req1);
            //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 1);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(requestmessage);
               string errormsg = Response.GetErrorMessage();
               if (errormsg != string.Empty)
               {
               this.submitbtn.SetEnabled(true);

               MessageBox.Show(errormsg);
               this.area01txt.SetFocus();
               this.task_req1 = null;

               }
               else
               {

                   this.task_res1 = Response.Deserialize<task_res.Utility>();
                   //Console.WriteLine(task_res1);
                   //6上架4拣货
                   if (task_res1.UtilityHeader.rectype == "6")
                   {

                       this.OpenRFTPA00Frm(this.loginuser, this.task_res1);
                   }
                   else if (task_res1.UtilityHeader.rectype == "4")
                   {
                        this.OpenRFTPK01C( this.loginuser, this.task_res1);
                   }
                   else
                   {

                   }

               }
        }
コード例 #4
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)
            {
                this.submitbtn.SetEnabled(true);
                this.Stop();
                MessageBox.Show(errormsg);
                this.area01txt.SetFocus();
                this.task_req1 = null;

            }
            else
            {
                if (tag == 1)
                {
                    this.Stop();
                    this.task_res1 = e.WorkItem.Response.Deserialize<task_res.Utility>();
                    //Console.WriteLine(task_res1);
                    //6上架4拣货
                    if (task_res1.UtilityHeader.rectype == "6")
                    {

                        InvokeHelper.Invoke(this, "OpenRFTPA00Frm", this.loginuser, this.task_res1);
                    }
                    else if (task_res1.UtilityHeader.rectype == "4")
                    {
                        InvokeHelper.Invoke(this, "OpenRFTPK01C", this.loginuser, this.task_res1);
                    }
                    else
                    {

                    }
                }
            }
        }