Пример #1
0
        private void dataGridViewPagingSumCtrl_CurrentPageIndexChanged(int index)
        {
            try
            {
                if (this.pagePara == null)
                {
                    return;
                }
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                pagePara.PageIndex = index;
                AllocateOrderPage listPage = null;
                //if (this.isAllocateInbound)
                //{
                listPage = CommonGlobalCache.ServerProxy.GetAllocateOrderPage(this.pagePara);
                //}
                //else
                //{
                //    listPage = CommonGlobalCache.ServerProxy.GetAllocateOutboundPage(this.pagePara);
                //}
                this.BindingAllocateOrderSource(listPage);
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
Пример #2
0
        private void BindingAllocateOrderSource(AllocateOrderPage listPage)
        {
            if (listPage != null && listPage.AllocateOrderList != null && listPage.AllocateOrderList.Count > 0)
            {
                this.curAllocateOrderListSource = listPage.AllocateOrderList;

                foreach (var order in listPage.AllocateOrderList)
                {
                    order.SourceShopName = CommonGlobalCache.GetShopName(order.SourceShopID);
                    order.DestShopName   = CommonGlobalCache.GetShopName(order.DestShopID);
                    order.OperatorName   = CommonGlobalCache.GetUserName(order.SourceUserID);
                }
            }

            this.curAllocateOrderListSource = listPage?.AllocateOrderList;
            this.dataGridViewPagingSumCtrl.BindingDataSource(this.curAllocateOrderListSource, null, listPage?.TotalEntityCount, listPage?.AllocateOrderSum);
            this.skinSplitContainer1.Panel2Collapsed = true;
        }
Пример #3
0
        private void Search()
        {
            AllocateOrderPage listPage = null;

            if (this.isAllocateInbound)
            {
                this.pagePara.SourceShopID = (string)this.skinComboBox_DestShop.SelectedValue;
                this.pagePara.DestShopID   = CommonGlobalCache.CurrentShopID;
            }
            else
            {
                this.pagePara.DestShopID   = (string)this.skinComboBox_DestShop.SelectedValue;
                this.pagePara.SourceShopID = CommonGlobalCache.CurrentShopID;
            }
            listPage = CommonGlobalCache.ServerProxy.GetAllocateOrderPage(this.pagePara);
            dataGridViewPagingSumCtrl.OrderPara = pagePara;
            this.dataGridViewPagingSumCtrl.Initialize(listPage);
            this.BindingAllocateOrderSource(listPage);
        }
Пример #4
0
        public AllocateOrderPickForm()
        {
            InitializeComponent();
            dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(this.dataGridView1);
            dataGridViewPagingSumCtrl.Initialize();
            dataGridViewPagingSumCtrl.ShowRowCounts = false;
            dataGridViewPagingSumCtrl1 = new DataGridViewPagingSumCtrl(this.dataGridView2);
            dataGridViewPagingSumCtrl1.Initialize();
            dataGridViewPagingSumCtrl1.ShowRowCounts = false;
            string SourceShopStr = string.Empty;

            if (HasPermission(RolePermissionMenuEnum.调拨, RolePermissionEnum.查看_只看本店))
            {
                SourceShopStr = CommonGlobalCache.CurrentShopID;
            }
            AllocateOrderPagePara para = new AllocateOrderPagePara()
            {
                SourceShopID       = SourceShopStr,
                AllocateOrderState = AllocateOrderState.HangUp,
                IsOpenDate         = true,
                PageIndex          = 0,

                PageSize = Int32.MaxValue
            };
            AllocateOrderPage page = CommonGlobalCache.ServerProxy.GetAllocateOrderPage(para);

            if (page != null)
            {
                orders = page.AllocateOrderList;
                if (orders != null)
                {
                    foreach (var item in orders)
                    {
                        item.DestShopName   = CommonGlobalCache.GetShopName(item.DestShopID);
                        item.SourceShopName = CommonGlobalCache.GetShopName(item.SourceShopID);
                    }
                }
            }

            dataGridViewPagingSumCtrl.BindingDataSource(orders);

            MenuPermission = Core.RolePermissionMenuEnum.调拨;
        }
Пример #5
0
        private void BindingAllocateOrderSource(AllocateOrderPage listPage)
        {
            skinSplitContainer1.Panel2Collapsed = true;
            curAllocateOrderListSource          = null;
            if (listPage != null && listPage.AllocateOrderList != null && listPage.AllocateOrderList.Count > 0)
            {
                this.curAllocateOrderListSource = listPage.AllocateOrderList;

                foreach (var item in listPage.AllocateOrderList)
                {
                    switch (item.State)
                    {
                    case (byte)AllocateOrderState.Delivery:
                        // item.Operation = this.isAllocateInbound ?"收货":"冲单";
                        item.Operation = item.DestShopID == CommonGlobalCache.CurrentShopID ? "收货" : string.Empty;
                        if (String.IsNullOrEmpty(item.Operation))
                        {
                            item.Operation = item.SourceShopID == CommonGlobalCache.CurrentShopID ? "冲单" : string.Empty;
                        }
                        break;

                    case (byte)AllocateOrderState.OverrideOrder:
                        item.Operation = this.isAllocateInbound ? string.Empty : "重做";
                        break;

                    case (byte)AllocateOrderState.HangUp:
                        item.Operation = this.isAllocateInbound ? string.Empty : "提单";
                        break;

                    default:
                        item.Operation = string.Empty;
                        break;
                    }
                }
            }
            this.dataGridViewPagingSumCtrl.BindingDataSource(this.curAllocateOrderListSource, null, listPage?.TotalEntityCount, listPage?.AllocateOrderSum);
        }