Exemplo n.º 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);
     }
 }