Exemplo n.º 1
0
        private void BaseButton_AddCostume_Click(object sender, EventArgs e)
        {
            try
            {
                int buyCount = int.Parse(this.skinTextBox_bugCount.SkinTxt.Text);
                PfCustomerRetailDetail detail = new PfCustomerRetailDetail()
                {
                    PfCustomerID   = pfCustomer.ID,
                    PfCustomerName = PfCustomerCache.GetPfCustomerName(pfCustomer.ID),
                    CostumeID      = this.currentSelectedItem.Costume.ID,
                    CostumeName    = this.currentSelectedItem.Costume.Name,
                    ColorName      = this.skinComboBox_Color.Text,
                    SizeName       = ValidateUtil.CheckEmptyValue(this.skinComboBox_Size.SelectedValue),
                    // 显示自己设置的尺码组和对应的尺码列表
                    SizeDisplayName = CostumeStoreHelper.GetCostumeSizeName(ValidateUtil.CheckEmptyValue(this.skinComboBox_Size.SelectedValue), CommonGlobalCache.GetSizeGroup(this.currentSelectedItem.Costume.SizeGroupName)),
                    BuyCount        = buyCount,
                };

                if (!this.AddSelectedCostumeToList(detail))
                {
                    return;
                }
                dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(this.PfCustomerRetailDetailList));
                lastAddCustomer = pfCustomer;
                this.skinTextBox_bugCount.SkinTxt.Text = "1";
            }
            catch (Exception ee)
            {
                CommonGlobalUtil.WriteLog(ee);
                GlobalMessageBox.Show("添加失败!");
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绑定CostumeStore数据源
        /// </summary>
        /// <param name="listPage"></param>
        private void BindingCostumeStoreDataSource(PfCustomerStorePage listPage)
        {
            this.dataGridView1.DataSource = null;
            this.costumeStoreList.Clear();
            if (listPage != null && listPage.PfCustomerStores != null)
            {
                foreach (PfCustomerStore store in listPage.PfCustomerStores)
                {
                    Costume costume = CommonGlobalCache.GetCostume(store.CostumeID);
                    if (costume != null)

                    {
                        store.PfCustomerName = PfCustomerCache.GetPfCustomerName(store.PfCustomerID);
                        store.CostumeName    = costume.Name;
                        store.Remarks        = costume.Remarks;
                    }
                    this.costumeStoreList.Add(store);
                }
                if (this.costumeStoreList != null && this.costumeStoreList.Count > 0)
                {
                    this.dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerStore>(DataGridViewUtil.ToDataTable <PfCustomerStore>(costumeStoreList));
                }
            }
            this.dataGridView1.Refresh();
        }
Exemplo n.º 3
0
        public WholesaleDeliveryPickForm(bool isPurchase)
        {
            InitializeComponent();
            MenuPermission            = RolePermissionMenuEnum.批发发货;
            dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(this.dataGridView1);
            dataGridViewPagingSumCtrl.Initialize();
            dataGridViewPagingSumCtrl.ShowRowCounts = false;
            dataGridViewPagingSumCtrl1 = new DataGridViewPagingSumCtrl(this.dataGridView2);
            dataGridViewPagingSumCtrl1.Initialize();
            dataGridViewPagingSumCtrl1.ShowRowCounts = false;

            if (isPurchase)
            {
                this.Text = "批发发货单提单";
            }
            else
            {
                this.Text = "批发退货单提单";
            }
            GetHangUpPfsPara para = new GetHangUpPfsPara()
            {
                IsDelivery = isPurchase
            };

            orders = GlobalCache.ServerProxy.GetHangUpPfs(para);
            if (orders != null)
            {
                foreach (var item in orders)
                {
                    item.PfCustomerName = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                    item.AdminUserName  = CommonGlobalCache.GetUserName(item.AdminUserID);
                }
            }
            dataGridViewPagingSumCtrl.BindingDataSource(orders);
        }
Exemplo n.º 4
0
        private void LoadOrder(PfOrder order)
        {
            if (order != null)
            { //冲单重做
                skinComboBox_PfCustomer.SelectedValue = order.PfCustomerID;
                dateTimePicker_Start.Value            = order.CreateTime;
                numericTextBoxMoney.Value             = order.PayMoney;
                SetPayType(order.PayType);
                skinComboBoxShopID.SelectedValue = order.ShopID;
                curInboundDetailList             = GlobalCache.ServerProxy.GetPfOrderDetails(order.ID);
                if (curInboundDetailList != null)
                {
                    foreach (var item in curInboundDetailList)
                    {
                        Costume costume = CommonGlobalCache.GetCostume(item.CostumeID);
                        item.CostumeName  = costume.Name;
                        item.CustomerID   = order.PfCustomerID;
                        item.BrandName    = CommonGlobalCache.GetBrandName(costume.BrandID);
                        item.CustomerName = PfCustomerCache.GetPfCustomerName(item.CustomerID);
                    }
                }
                skinTextBox_Remarks.Text = order.Remarks;
            }

            this.BindingInboundDetailSource();
        }
Exemplo n.º 5
0
 private void BindingDataSource(CustomerRetailPage listPage)
 {
     if (listPage?.PfCustomerRetailOrders != null)
     {
         foreach (var item in listPage?.PfCustomerRetailOrders)
         {
             item.PfCustomerName = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
         }
     }
     dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PfCustomerRetailOrders, null, listPage?.TotalEntityCount);
 }
Exemplo n.º 6
0
        private void BindingSource(PfAccountRecordPage listPage)
        {
            if (listPage != null && listPage.PfAccountRecords != null && listPage.PfAccountRecords.Count > 0)
            {
                foreach (var item in listPage.PfAccountRecords)
                {
                    item.PfCustomerName  = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                    item.AccountTypeName = GlobalUtil.GetPfAccountTypeName(item.AccountType);
                    //item.AdminUserName = PfCustomerCache.GetUserNameWithPf(item.AdminUserID);
                }
            }

            this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PfAccountRecords, null, listPage?.TotalEntityCount, listPage?.Sum);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 绑定plenishOrderSource源到dataGridView中
        /// </summary>
        /// <param name="listPage"></param>
        private void BindingReturnOrderSource(PfOrderPage listPage)
        {
            if (listPage != null && listPage.PfOrders != null && listPage.PfOrders.Count > 0)
            {
                List <PfOrder> details = listPage.PfOrders;
                foreach (var item in details)
                {
                    item.PfCustomerName = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                    item.AdminUserName  = CommonGlobalCache.GetUserName(item.AdminUserID);
                }
            }

            this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PfOrders, null, listPage?.TotalEntityCount, listPage?.PfOrderSum);
            this.skinSplitContainer1.Panel2Collapsed = true;
        }
Exemplo n.º 8
0
        private void BindingDataSource(PfCustomerOrderPage listPage)
        {
            splitContainer1.Panel2Collapsed = true;
            if (listPage != null && listPage.PfCustomerOrders != null && listPage.PfCustomerOrders.Count > 0)
            {
                foreach (var item in listPage.PfCustomerOrders)
                {
                    item.PfCustomerName = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                }

                this.dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerOrder>(listPage?.PfCustomerOrders, null, listPage?.TotalEntityCount);
            }
            else
            {
                this.dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerOrder>(listPage?.PfCustomerOrders, null, 0);
            }
        }
 private void BindingSource(List <PfCustomerStore> listPage)
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new  CJBasic.CbGeneric <List <PfCustomerStore> >(this.BindingSource), listPage);
     }
     else
     {
         if (listPage != null)
         {
             for (int i = 0; i < listPage.Count; i++)
             {
                 listPage[i].CostumeName    = CommonGlobalCache.GetCostumeName(listPage[i].CostumeID);
                 listPage[i].PfCustomerName = PfCustomerCache.GetPfCustomerName(listPage[i].PfCustomerID);
                 // Thread.Sleep(2);
                 //UpdateProgress("正在加载中 ");
             }
         }
         dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerStore>(DataGridViewUtil.ListToBindingList(listPage));
         //CompleteProgressForm();
     }
 }