Ejemplo n.º 1
0
        public void call_asnlist01(string pier)
        {
            //this.Start();
            //this.portlist.Items.Clear();
            //this.portlist.Enabled = false;
            asnlist01req = asnlist01_req.AdvancedShipNotice.Create(pier);

            RequestMessage request = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.AdvancedShipNotice,
                  enumRequestMethod.listHead, this.loginuser,
                  enumSendSysId.EXceed,
                  asnlist01req);
            //RequestWorkItem workitem = new RequestWorkItem(request, 2);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(request);
            string errormsg = Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(Response.GetErrorMessage());
            }
            else
            {
                asnlist01res = Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
                foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                {
                    if (!string.IsNullOrEmpty(body.ReceiptKey))
                    {
                        this.addasnlist(body.ReceiptKey + " " + body.StorerKey + " " + body.Status);
                    }
                    //InvokeHelper.Invoke(this, "addasnlist", body.ReceiptKey + " " + body.StorerKey + " " + body.Status);
                }
            }
        }
        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(item.Response.GetErrorMessage());
                if (tag == 1)
                {
                    this.asnbylinereq = null;
                    this.asnskureq = null;
                    this.asnskures = null;
                    this.storerkeytxt.Clean();
                    this.skutxt.Clean();
                    this.receiptkeytxt.SetFocus();
                }
                if (tag == 2)
                {
                    this.skutxt.SetFocus();
                }
                if (tag == 3)
                {
                    if (errormsg.IndexOf("ID has already been used") >= 0)
                    {
                        this.idtxt.SetFocus();
                    }
                    else if (errormsg.IndexOf("Received Qty > Expected Qty") > 0)
                    {
                        this.qtytxt.SetFocus();
                    }
                    else
                    {
                        this.receiptkeytxt.SetFocus();
                    }
                }
                if (tag == 4)
                {
                    this.receiptkeytxt.SetFocus();
                }
                return;
            }
            if (tag == 1)
            {
                asnbylineres = e.WorkItem.Response.Deserialize<flrs1_res.Utility>();
                this.storerkeytxt.SetText(asnbylineres.UtilityHeader.StorerKey);
                this.receivelinereq.UtilityHeader.storerkey = asnbylineres.UtilityHeader.StorerKey;
                this.receivelinereq.UtilityHeader.sku = asnbylineres.UtilityHeader.Sku;
                this.receivelinereq.UtilityHeader.uom = "EA";
                //this.skutxt.SetText(asnbylineres.UtilityHeader.Sku);
                this.skutxt.Clean();
                this.desctxt.Clean();
                this.packkeytxt.Clean();
                this.idtxt.Clean();
                this.qtytxt.SetText("0");
            }
            if (tag == 2)
            {
                asnskures = e.WorkItem.Response.Deserialize<flrs2_res.Utility>();
                this.desctxt.SetText(asnskures.UtilityHeader.desc);
                this.packkeytxt.SetText(asnskures.UtilityHeader.pack);
                //this.qtytxt.SetText("");
                //this.uomtxt.SetText(asnskures.UtilityHeader.UOM);

                setLottableValue(asnskures.UtilityHeader);

                createLottableControl(asnskures.UtilityHeader);

            }
            if (tag == 3)
            {
                receivelineres = e.WorkItem.Response.Deserialize<flrs3_res.Utility>();
                string receiptkey = receivelineres.UtilityHeader.prokey;
                this.receivelinereq = new flrs3_req.Utility();

                this.receivelinereq.UtilityHeader.prokey = receivelineres.UtilityHeader.prokey;
                this.receivelinereq.UtilityHeader.receiptkey = receivelineres.UtilityHeader.prokey;
                this.receivelinereq.UtilityHeader.drid = this.dropid;
                this.asnbylinereq = null;
                this.asnbylineres = null;
                this.asnskureq = null;
                this.asnskures = null;
                this.receivelineres = null;
                this.desctxt.Clean();
                InvokeHelper.Invoke(this, "dataBinding", null);
                //MessageBox.Show("收货完成");
                this.receiptkeytxt.SetFocus();
                InvokeHelper.Invoke(this, "call_asnlist01", receiptkey);

            }
            if (tag == 4)
            {
                drid_res.Utility dridres = e.WorkItem.Response.Deserialize<drid_res.Utility>();
                this.call_NSPRFRC01E(dridres.UtilityHeader.tag, dridres.UtilityHeader.storer,dridres.UtilityHeader.Sku);

            }
            if (tag == 5)
            {
                drid_res1.Utility dridres1 = e.WorkItem.Response.Deserialize<drid_res1.Utility>();
                MessageBox.Show("载具已经提交.");
                this.receiptkeytxt.SetFocus();
            }
            if (tag == 10)
            {
                //status=9,11,15 表示收货全部完成
                asnlistres = e.WorkItem.Response.Deserialize<asnlist_res.AdvancedShipNotice>();
                if(asnlistres.AdvancedShipNoticeHeaders.Count>0){
                string status=asnlistres.AdvancedShipNoticeHeaders[0].Status;
                if (status == "9" || status == "11" || status == "15")
                {
                    MessageBox.Show("该ASN已经收货完成.");
                    this.receiptkeytxt.Clean();
                }
                else
                {
                    MessageBox.Show("该行收货完成.");
                }

                }
            }
        }
        public void call_asnlist01(string receiptkey)
        {
            asnlistreq = asnlist_req.AdvancedShipNotice.CreateByReceiptKey(receiptkey,"");
            RequestMessage request = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.AdvancedShipNotice,
                  enumRequestMethod.listHead, this.loginuser,
                  enumSendSysId.EXceed,
                  asnlistreq);
            RequestWorkItem workitem = new RequestWorkItem(request, 10);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(request);
            string errormsg = Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(Response.GetErrorMessage());
            }
            else
            {
                asnlistres =Response.Deserialize<asnlist_res.AdvancedShipNotice>();
                if (asnlistres.AdvancedShipNoticeHeaders.Count > 0)
                {
                    string status = asnlistres.AdvancedShipNoticeHeaders[0].Status;
                    if (status == "9" || status == "11" || status == "15")
                    {
                        MessageBox.Show("该ASN已经收货完成.");
                        this.receiptkeytxt.Clean();
                        this.receiptLineNumbertxt.Clean();
                    }
                    else
                    {
                        //MessageBox.Show("该行收货完成.");
                        this.receiptLineNumbertxt.SetFocus();
                    }

                }
            }
        }
Ejemplo n.º 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)
            {
                MessageBox.Show(item.Response.GetErrorMessage());
            }
            else
            {
                if (tag == 1)
                {
                    arrivalres = e.WorkItem.Response.Deserialize<arrival_res.AdvancedShipNotice>();

                    MessageBox.Show("分料开始", "提示");
                    //InvokeHelper.Set(this, "DialogResult", DialogResult.OK);
                    this.submit2.SetEnabled(true);

                }

                if (tag == 2)
                {
                    arrivalres = e.WorkItem.Response.Deserialize<arrival_res.AdvancedShipNotice>();
                    MessageBox.Show("分料完毕", "提示");
                    this.submit2.SetEnabled(false);
                    //InvokeHelper.Set(this, "DialogResult", DialogResult.OK);

                }
                if (tag == 3)
                {
                    asnlist01res = e.WorkItem.Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
                    if (asnlist01res != null)
                    {
                        if (string.IsNullOrEmpty(asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey))
                        {
                            MessageBox.Show("没有找到ASN", "提示");
                            this.receiptkey.SetFocus();
                        }
                        else
                        {
                            this.storerkey.SetText(asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey);
                            this.linecount = asnlist01res.AdvancedShipNoticeHeaders[0].AdvancedShipNoticeDetail.Count;
                        }

                    }

                    //foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                    //    InvokeHelper.Invoke(this, "addportlist", body.ReceiptKey + " " + body.StorerKey);
                }
            }
        }
 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(item.Response.GetErrorMessage());
     }
     else
     {
         if (tag == 1)
         {
             asnlist01res = e.WorkItem.Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
             foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                 InvokeHelper.Invoke(this, "addportlist", body.ReceiptKey + " " + body.StorerKey);
         }
         if (tag == 2)
         {
             arrivalres = e.WorkItem.Response.Deserialize<arrival_res.AdvancedShipNotice>();
             InvokeHelper.Set(this.portlist, "Enabled", true);
         }
     }
 }
Ejemplo n.º 6
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(item.Response.GetErrorMessage());
            }
            else
            {
                if (tag == 1)
                {
                    dmres = e.WorkItem.Response.Deserialize<dm01_res.DoorsManagement>();
                    string str = string.Format("{0} {1}", dmres.DoorsManagementHeader[0].DOORSKEY, dmres.DoorsManagementHeader[0].PLATENUMBER);
                    if (str.Length > 10)
                    {
                        //InvokeHelper.Invoke(this, "addportlist", str);
                        dm01_res.DoorsManagementHeader hd = dmres.DoorsManagementHeader[0];
                        dmreq02 = new dm02_req.DoorsManagement();
                        dmreq02.DoorsManagementHeader.AddWho = hd.AddWho;
                        dmreq02.DoorsManagementHeader.DoorsKey = hd.DOORSKEY;
                        dmreq02.DoorsManagementHeader.DriverCompany = hd.DRIVERCOMPANY;
                        dmreq02.DoorsManagementHeader.DriverName = hd.DriverName;
                        dmreq02.DoorsManagementHeader.DriverPhone = hd.DRIVERPHONE;
                        dmreq02.DoorsManagementHeader.EditWho = hd.EditWho;
                        dmreq02.DoorsManagementHeader.IOGoods = hd.IOGOODS;
                        dmreq02.DoorsManagementHeader.ParkNum = hd.PARKNUM;
                        dmreq02.DoorsManagementHeader.PlateNumber = hd.PLATENUMBER;
                        dmreq02.DoorsManagementHeader.SerialKey = hd.SerialKey;
                        dmreq02.DoorsManagementHeader.Status = hd.Status;
                        dmreq02.DoorsManagementHeader.WhseId = hd.WhseId;
                        foreach (dm01_res.DoorsManagementDetail detail in hd.DoorsManagementDetail)
                        {
                            if (detail.Status == "0")
                            {
                                dm02_req.DoorsManagementDetail newitem = new dm02_req.DoorsManagementDetail();
                                newitem.ParkNum = detail.PARKNUM;
                                newitem.DoorsKey = detail.DOORSKEY;
                                newitem.DoorsLineNumber = detail.DOORSLINENUMBER;
                                newitem.Pier = detail.PIER;
                                newitem.SerialKey = detail.SerialKey;
                                this.portcodetxt.SetText(detail.PIER);
                                dmreq02.DoorsManagementHeader.DoorsManagementDetail.Add(newitem);
                                InvokeHelper.Invoke(this, "call_asnlist01", detail.PIER);
                                break;

                            }
                        }
                    }
                    else
                    {
                        dmres = null;
                        MessageBox.Show("没有找到改车的进门记录", "提示");
                        this.parknumtxt.SetFocus();
                    }
                }
                if (tag == 2)
                {

                    asnlist01res = e.WorkItem.Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
                    foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                    {
                        InvokeHelper.Invoke(this, "addasnlist", body.ReceiptKey + " " + body.StorerKey + " " + body.Status);
                    }
                }
                if (tag == 3)
                {
                    asnlist01res = e.WorkItem.Response.Deserialize<asnlist01_res.AdvancedShipNotice>();

                        //this.storerkeytxt.SetText(asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey);

                    //foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                    //    InvokeHelper.Invoke(this, "addportlist", body.ReceiptKey + " " + body.StorerKey);
                }
                if (tag == 4)
                {
                    MessageBox.Show("车辆已离开码头", "提示");
                }
            }
        }
Ejemplo n.º 7
0
 private void call_asnlist01(string asn)
 {
     //this.Start();
     //this.asnlist.Items.Clear();
     this.asnlist.Enabled = false;
     asnlist01req = asnlist01_req.AdvancedShipNotice.CreateByReceiptKey(asn);
     RequestMessage request = new RequestMessage(enumRequestType.MessageProcessor,
           enumMessageType.AdvancedShipNotice,
           enumRequestMethod.listHead, this.loginuser,
           enumSendSysId.EXceed,
           asnlist01req);
     //RequestWorkItem workitem = new RequestWorkItem(request, 3);
     //threadhelper.AddWorkItem(workitem);
     ResponseMessage Response = ThreadHelper.Execute(request);
     string errormsg = Response.GetErrorMessage();
     if (errormsg != string.Empty)
     {
         MessageBox.Show(Response.GetErrorMessage());
         this.asntxt.SetFocus();
     }
     else
     {
         asnlist01res = Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
         if (asnlist01res != null)
         {
             string str = string.Format("{0} {1}", asnlist01res.AdvancedShipNoticeHeaders[0].ReceiptKey, asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey);
             if (str.Length > 10)
             {
                 //InvokeHelper.Invoke(this, "addasnlist", str);
                 this.addasnlist(str);
                 this.asntxt.SetText("");
                 this.asntxt.SetFocus();
             }
             else
             {
                 asnlist01res = null;
                 MessageBox.Show("没有找到ASN", "提示");
                 this.asntxt.SetFocus();
             }
             //this.storerkeytxt.SetText(asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey);
         }
     }
 }
Ejemplo n.º 8
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(item.Response.GetErrorMessage());
            }
            if (tag == 1)
            {
                asnlist01res = e.WorkItem.Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
                if (asnlist01res != null)
                {
                    this.storerKey.SetText(asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey);

                    foreach(asnlist01_res.AdvancedShipNoticeDetail detail in asnlist01res.AdvancedShipNoticeHeaders[0].AdvancedShipNoticeDetail){
                        if (detail.PQCSTATUS.ToLower() != "c")
                        {
                            string itemstring = string.Format("{0} {1} {2}", detail.ReceiptLineNumber, detail.Sku, detail.QtyExpected);

                            InvokeHelper.Invoke(this, "addasnlist", itemstring);
                        }
                    }
                    if (asnlist01res.AdvancedShipNoticeHeaders[0].Status == "106")
                    {
                        InvokeHelper.Set(this.asnlist, "Enabled", true);
                        InvokeHelper.Invoke(this, "openRFPqcFrm", null);
                    }
                }

                //foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                //    InvokeHelper.Invoke(this, "addportlist", body.ReceiptKey + " " + body.StorerKey);
            }
            if (tag == 2)
            {
                arrivalres = e.WorkItem.Response.Deserialize<arrival_res.AdvancedShipNotice>();
                InvokeHelper.Set(this.asnlist, "Enabled", true);
                InvokeHelper.Invoke(this, "openRFPqcFrm",null        );
            }
        }
Ejemplo n.º 9
0
        private void call_asnlist01(string asn)
        {
            //this.Start();
            this.asnlist.Items.Clear();
            this.asnlist.Enabled = false;
            asnlist01req = asnlist01_req.AdvancedShipNotice.CreateByReceiptKeyPQC(asn);
            RequestMessage request = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.AdvancedShipNotice,
                  enumRequestMethod.list, this.loginuser,
                  enumSendSysId.EXceed,
                  asnlist01req);
            //RequestWorkItem workitem = new RequestWorkItem(request, 1);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(request);
            string errormsg = Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(Response.GetErrorMessage());
                this.receiptKey.SetFocus();
            }
            else
            {
                asnlist01res =  Response.Deserialize<asnlist01_res.AdvancedShipNotice>();
                if (asnlist01res != null)
                {
                    this.storerKey.SetText(asnlist01res.AdvancedShipNoticeHeaders[0].StorerKey);

                    foreach (asnlist01_res.AdvancedShipNoticeDetail detail in asnlist01res.AdvancedShipNoticeHeaders[0].AdvancedShipNoticeDetail)
                    {
                        if (detail.PQCSTATUS.ToLower() != "c" && decimal.Parse(detail.QtyExpected)>0)
                        {
                            string itemstring = string.Format("{0} {1} {2}", detail.ReceiptLineNumber, detail.Sku, detail.QtyExpected);

                            //InvokeHelper.Invoke(this, "addasnlist", itemstring);
                            this.addasnlist(itemstring);
                        }
                    }
                    if (asnlist01res.AdvancedShipNoticeHeaders[0].Status == "106")
                    {
                        this.asnlist.Enabled = true;
                        this.openRFPqcFrm();
                        //InvokeHelper.Set(this.asnlist, "Enabled", true);
                        //InvokeHelper.Invoke(this, "openRFPqcFrm", null);
                    }
                }

                //foreach (asnlist01_res.AdvancedShipNoticeHeader body in asnlist01res.AdvancedShipNoticeHeaders)
                //    InvokeHelper.Invoke(this, "addportlist", body.ReceiptKey + " " + body.StorerKey);
            }
        }