コード例 #1
0
 private void Initialize()
 {
     try
     {
         if (GlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         //  ShowMessage(this.SourceTabPage.ToString());
         PfCustomerDetails listPage = GlobalCache.EMallServerProxy.GetPfCustomerDetails(this.Order.ID);
         Dictionary <PfOrder, List <PfCustomerDetail> > Dlist = listPage.DeliveryDict;
         List <PfCustomerDetail> list = new List <PfCustomerDetail>();
         foreach (var item in Dlist)
         {
             if (item.Key.PfCustomerOrderID == this.Order.ID)
             {
                 list = item.Value;
             }
         }
         if (sourceCtrl.ToString() == "JGNet.Common.WholesaleCustomerBalanceDetailCtrl")
         {
             if (list.Count == 0 && listPage.NotDeliverys.Count > 0)
             {
                 list = listPage.NotDeliverys;
             }
         }
         this.BindingDataSource(list);
     }
     catch (Exception ex)
     {
         GlobalUtil.ShowError(ex);
     }
     finally
     {
         GlobalUtil.UnLockPage(this);
     }
 }
コード例 #2
0
        public void Search(PfCustomerOrder order)
        {
            this.Order = order;
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }


                PfCustomerDetails listPage = GlobalCache.EMallServerProxy.GetPfCustomerDetails(this.Order.ID);
                this.BindingDataSource(listPage.NotDeliverys);
                this.skinLabelOrderId.Text = this.Order.ID;
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
コード例 #3
0
        private void EmOrderLogisticsForm_Load(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                PfCustomerDetails listPage = GlobalCache.EMallServerProxy.GetPfCustomerDetails(this.Order.ID);
                skinLabelPayState.Text = this.Order.IsPay ? "已付款" : "未付款";
                if (this.Order.IsPay)
                {
                    skinLabel2.Text = this.Order.Remarks + "  ";
                }
                //tabPage1.Hide();
                tabControl1.TabPages.Remove(tabPageCancel);
                // this.BindingDataSource(listPage.NotDeliverys);
                pfCustomerOrder = listPage.PfCustomerOrder;
                // skinLabelReceivedContact.Text = pfCustomerOrder.ReceiverName + "," + pfCustomerOrder.ReceiverTelphone;
                skinLabelReceivedInfo.Text = pfCustomerOrder.ReceiverName + "," + pfCustomerOrder.ReceiverTelphone + " " + pfCustomerOrder.ReceiverCityZone + " " + pfCustomerOrder.ReceiverDetailAddress + "  ";
                switch (Order.State)
                {
                case (int)PfCustomerOrderState.WaitDelivery:
                    skinPanelLogic.Visible = false;
                    baseButtonCancel.Text  = "作废";
                    tabPageNotDeliver.Tag  = listPage.NotDeliverys;
                    BindingDataSource(listPage.NotDeliverys);
                    break;

                case (int)PfCustomerOrderState.PartDelivery:
                {
                    skinPanelLogic.Visible = false;
                    tabPageNotDeliver.Tag  = listPage.NotDeliverys;
                    BindingDataSource(listPage.NotDeliverys);
                    baseButtonCancel.Text = "取消";
                    int i = 1;
                    Dictionary <PfOrder, List <PfCustomerDetail> > keyValues = listPage.DeliveryDict;
                    foreach (var item in keyValues)
                    {
                        TabPage page = new TabPage("已发货" + (i));
                        page.Tag = item;
                        tabControl1.TabPages.Insert(i, page);
                        i++;
                    }
                    break;
                }

                case (int)PfCustomerOrderState.Finish:
                {
                    int i = 1;
                    Dictionary <PfOrder, List <PfCustomerDetail> > keyValues = listPage.DeliveryDict;
                    foreach (var item in keyValues)
                    {
                        TabPage page = new TabPage("已发货" + (i));
                        page.Tag = item;
                        tabControl1.TabPages.Insert(i, page);
                        i++;
                    }
                    tabPageCancel.Tag = listPage.NotDeliverys;
                    tabControl1.TabPages.Add(tabPageCancel);
                    skinPanelBtn.Visible   = false;
                    skinPanelLogic.Visible = false;
                    break;
                }

                case (int)PfCustomerOrderState.Invalid:
                    skinPanelBtn.Visible   = false;
                    skinPanelLogic.Visible = false;
                    BindingDataSource(listPage.NotDeliverys);
                    break;

                default:
                    break;
                }



                CheckPermisson();
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }