private void dataGridView_RetailOrder_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            try
            {
                DataGridViewUtil.CellFormatting_ReportShowZero(e, ReportShowZero);
                if (e.RowIndex < 0 || e.ColumnIndex < 0)
                {
                    return;
                }
                DataGridViewRow row   = dataGridView_RetailOrder.Rows[e.RowIndex];
                RetailOrder     order = (RetailOrder)row.DataBoundItem;

                if (column_guideName.Index == e.ColumnIndex)
                {
                    e.Value = CommonGlobalCache.GetUserName(order.GuideID);
                }
                else if (shopIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
                {
                    if (isOnline)
                    {
                        e.Value = SystemDefault.onlineName;
                    }
                    else
                    {
                        e.Value = CommonGlobalCache.GetShopName(order.ShopID);
                    }
                }
            }
            catch { }
        }
 private void Initialize()
 {
     if (this.curAllocateOrder == null)
     {
         return;
     }
     try
     {
         this.skinTextBox_OrderID.Text = "调拨单号:" + this.curAllocateOrder.ID;
         this.skinLabelReceive.Text    = "收货方:" + CommonGlobalCache.GetShopName(this.curAllocateOrder.DestShopID);
         this.skinLabelSend.Text       = "发货方:" + CommonGlobalCache.GetShopName(this.curAllocateOrder.SourceShopID);
         skinLabelRemarks.Text         = "备注:" + curAllocateOrder.Remarks;
         List <BoundDetail> list = CommonGlobalCache.ServerProxy.GetInboundDetail(this.curAllocateOrder.InboundOrderID);
         if (curAllocateOrder.State == 1)
         {
             //this.curDateTime = curAllocateOrder.FinishedTime.ToString();
             this.skinLabel1.Text = curAllocateOrder.FinishedTime.ToString();
         }
         else
         {
             this.skinLabel1.Text = "";
             this.skinLabel4.Text = "";
         }
         this.BindingReplenishDetailSource(list);
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
Example #3
0
 public void Search()
 {
     try
     {
         if (CommonGlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         InReturnTrackChange listPage = CommonGlobalCache.ServerProxy.GetCostumeStoreChange4In(para);
         if (listPage != null && listPage.PurchaseOrders != null)
         {
             foreach (var item in listPage.PurchaseOrders)
             {
                 item.ShopName = CommonGlobalCache.GetShopName(item.DestShopID);
                 item.UserName = CommonGlobalCache.GetUserName(item.AdminUserID);
             }
         }
         dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PurchaseOrders, true, listPage?.PurchaseOrderSum);
     }
     catch (Exception ex) { CommonGlobalUtil.ShowError(ex); }
     finally
     {
         UnLockPage();
     }
 }
Example #4
0
        public ReplenishPickForm(string shopID)
        {
            InitializeComponent();
            dataGridView1.AutoGenerateColumns       = false;
            dataGridView2.AutoGenerateColumns       = false;
            dataGridViewPagingSumCtrl               = new DataGridViewPagingSumCtrl(this.dataGridView1);
            dataGridViewPagingSumCtrl.ShowRowCounts = false;
            dataGridViewPagingSumCtrl.Initialize();
            dataGridViewPagingSumCtrl1 = new DataGridViewPagingSumCtrl(this.dataGridView2);
            dataGridViewPagingSumCtrl1.ShowRowCounts = false;
            dataGridViewPagingSumCtrl1.Initialize();

            if (!string.IsNullOrEmpty(shopID))
            {
                orders = GlobalCache.ServerProxy.GetHangUpReplenishOrders(shopID, null);
                if (orders != null)
                {
                    foreach (var item in orders)
                    {
                        item.ShopName  = CommonGlobalCache.GetShopName(item.ShopID);
                        item.GuideName = CommonGlobalCache.GetUserName(item.RequestGuideID);
                    }
                }
            }
            dataGridViewPagingSumCtrl.BindingDataSource(orders);
        }
Example #5
0
        private void Initialize()
        {
            if (this.curReplenishOrder == null)
            {
                return;
            }
            try
            {
                this.skinTextBox_OrderID.Text = "补货申请单号:" + this.curReplenishOrder.ID;
                //this.skinLabel_ShopName.Text ="店铺名称:"+ CommonGlobalCache.GetShopName(this.curReplenishOrder.ShopID) ;
                //     this.skinTextBox_OrderID.Text = "调拨单号:" + this.curReplenishOrder.ID;
                this.skinLabelReceive.Text = "收货方:" + CommonGlobalCache.GetShopName(this.curReplenishOrder.ShopID);

                if (!String.IsNullOrEmpty(curReplenishOrder.AllocateOrderID))
                {
                    Outbound outbound = CommonGlobalCache.ServerProxy.GetOneOutbound(this.curReplenishOrder.AllocateOrderID);
                    if (outbound != null)
                    {
                        //获取出库单

                        this.skinLabelSend.Text = "发货方:" + CommonGlobalCache.GetShopName(outbound.OutboundOrder.ShopID);
                    }
                }

                skinLabelRemarks.Text = "备注:" + curReplenishOrder.Remarks;
                List <ReplenishDetail> list = CommonGlobalCache.ServerProxy.GetReplenishDetail(this.curReplenishOrder.ID);
                this.BindingReplenishDetailSource(list);
            }
            catch (Exception ee)
            {
                CommonGlobalUtil.Logger.Log(ee, "ReplenishDetailCtrl.Initialize", CJBasic.Loggers.ErrorLevel.Standard);
            }
        }
Example #6
0
        private void Initialize(RetailOrder order)
        {
            skinLabel_createDate.Text  = order.CreateTime.ToString();
            skinLabel_memberID.Text    = order.MemeberID;
            skinLabel_totalCount.Text  = order.TotalCount.ToString();
            skinLabel_totalMoney.Text  = order.TotalMoneyReceived.ToString();
            linkLabel_refundOrder.Text = order.RefundOrderID;
            skinLabel_orderID.Text     = order.ID;
            skinLabel_shop.Text        = CommonGlobalCache.GetShopName(order.ShopID);
            skinLabel_remark.Text      = order.Remarks;
            if (String.IsNullOrEmpty(order.SalesPromotionID))
            {
                this.skinLabel_SalesPromotion.Text = CommonGlobalUtil.COMBOBOX_NULL;
            }
            else
            {
                this.skinLabel_SalesPromotion.Text = order.PromotionText;
            }
            this.skinLabel_MoneyCash.Text    = order.MoneyCash.ToString();
            skinLabel_SmallMoneyRemoved.Text = order.SmallMoneyRemoved.ToString();
            //可能会少个一分钱

            this.skinLabel_MoneyStoredCard.Text  = order.MoneyVipCard.ToString() + "(赠送" + order.MoneyVipCardDonate + ")";
            skinLabelReceivedActual.Text         = order.TotalMoneyReceivedActual.ToString();
            this.skinLabel_MoneyBankCard.Text    = order.MoneyBankCard.ToString();
            this.skinLabel_MoneyIntegration.Text = order.MoneyIntegration.ToString();// (order.MoneyIntegration * CommonGlobalCache.IntegralConversionBalanceRatio).ToString();
            this.skinLabel_MoneyWeiXin.Text      = order.MoneyWeiXin.ToString();
            this.skinLabel_MoneyAlipay.Text      = order.MoneyAlipay.ToString();
            this.skinLabel_MoneyOther.Text       = order.MoneyOther.ToString();
            this.skinLabelGiftTicket.Text        = order.MoneyDeductedByTicket.ToString();
            skinLabel_guide.Text            = CommonGlobalCache.GetUserName(order.GuideID);
            this.skinLabel_MoneyChange.Text = order.MoneyChange.ToString();
        }
Example #7
0
 private void BindingSource(List <CostumeStore> listPage)
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new CbGeneric <List <CostumeStore> >(this.BindingSource), listPage);
     }
     else
     {
         if (listPage != null)
         {
             foreach (var item in listPage)
             {
                 item.ShopName = CommonGlobalCache.GetShopName(item.ShopID);
             }
         }
         if (costumeTextBox1.Text != "")
         {
             dataGridViewPagingSumCtrl.AppendNotShowInColumnSettings(Column2);
         }
         else
         {
             dataGridViewPagingSumCtrl.RemoveNotShowInColumnSettings(Column2);
         }
         dataGridViewPagingSumCtrl.BindingDataSource <CostumeStore>(DataGridViewUtil.ListToBindingList(listPage));
         CompleteProgressForm();
     }
 }
Example #8
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                if (isMonth)
                {
                    startDate = TimeHelper.GetReportMonth(this.dateTimePicker_Start.Value);
                    endDate   = TimeHelper.GetReportMonth(this.dateTimePicker_End.Value);
                }
                else
                {
                    startDate = TimeHelper.GetReportDay(this.dateTimePicker_Start.Value);
                    endDate   = TimeHelper.GetReportDay(this.dateTimePicker_End.Value);
                }

                this.pagePara = new GuideAchievementSummarysPara()
                {
                    IsMonth   = isMonth,
                    StartDate = startDate,
                    EndDate   = endDate,
                    //PageIndex = 0,
                    //PageSize = this.pageSize,
                    IsGetGeneralStore = CommonGlobalCache.IsGeneralStoreRetail == "1",
                    ShopID            = shopID,
                    GuideID           = ValidateUtil.CheckEmptyValue(guideComboBox1.SelectedValue),
                    IsOnlyShowNoZero  = this.skinCheckBox_IsOnlyShowNoZero.Checked
                };

                //     List<GuideAchievementSummary>

                GuideAchievementSummarys listPage = CommonGlobalCache.ServerProxy.GetGuideAchievementSummarys(this.pagePara);
                SetDisplay();
                if (listPage != null)
                {
                    foreach (GuideAchievementSummary item in listPage.List)
                    {
                        item.GuideName = CommonGlobalCache.GetUserName(item.GuideID);
                        item.ShopName  = CommonGlobalCache.GetShopName(item.ShopID);
                    }
                }

                dataGridViewPagingSumCtrl.BindingDataSource <GuideAchievementSummary>(DataGridViewUtil.ToDataTable <GuideAchievementSummary>(listPage?.List), null, ListSortDirection.Descending, listPage?.Sum);
                skinSplitContainer1.Panel2Collapsed = true;
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
Example #9
0
        private void dataGridView_RetailOrder_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            try
            {
                DataGridViewUtil.CellFormatting_ReportShowZero(e, ReportShowZero);
                if (e.RowIndex < 0 || e.ColumnIndex < 0)
                {
                    return;
                }
                DataGridViewRow row   = dataGridView_RetailOrder.Rows[e.RowIndex];
                RetailOrder     order = (RetailOrder)row.DataBoundItem;

                //if (column_guideName.Index == e.ColumnIndex)
                //{
                //    e.Value = CommonGlobalCache.GetUserName(order.GuideID);
                //}
                //else
                if (shopIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
                {
                    if (isOnline)
                    {
                        e.Value = SystemDefault.onlineName;
                    }
                    else
                    {
                        e.Value = CommonGlobalCache.GetShopName(order.ShopID);
                    }
                }
                else if (ColumnRemove.Index == e.ColumnIndex)
                {
                    if (order.IsCancel || order.ShopName == "线上商城")
                    {
                        e.Value = String.Empty;
                    }
                }
                else if (ColumnRedo.Index == e.ColumnIndex)
                {
                    if (!order.IsCancel)
                    {
                        e.Value = String.Empty;
                    }
                }

                /*  else if (GuideName.Index == e.ColumnIndex)
                 * {
                 *    if(order.)
                 * }*/

                //else if (ColumnEdit.Index == e.ColumnIndex)
                //{
                //    if (order.IsCancel)
                //    {
                //        e.Value = String.Empty;
                //    }
                //}
            }
            catch { }
        }
Example #10
0
        //简单打印示例
        public static void Print(DifferenceOrder item, DataGridView dataGridView2, int times = 1)
        {
            GoldPrinter.MisGoldPrinter misGoldPrinter = new GoldPrinter.MisGoldPrinter(false, new PrinterMargins(20, 20, 20, 20, 787, 1129));
            misGoldPrinter.Title   = "差异单";                     //主标题(C#用\n表示换行)
            misGoldPrinter.Caption = "";
            Header header = new Header(3, 2);                   //行列数基本不受限制,但超过一页失去意义,因为以Body为主,以其它为辅

            header.IsDrawAllPage = true;                        //可以指定每页是否重复打印
            header.SetText(0, 0, "差异单号:" + item.ID);
            header.SetText(0, 1, "来源单号:" + item.SourceOrderID); //DataSource可以是字符串、一维数组、二维数组、DataTable、WinDataGrid、WebDataGrid、ListView\ListView、
            header.SetText(1, 0, "发 货 方:" + CommonGlobalCache.GetShopName(item.OutboundShopID));
            header.SetText(1, 1, "收 货 方:" + CommonGlobalCache.GetShopName(item.InboundShopID));
            header.SetText(2, 0, "差异(盈):" + item.DiffCountWin.ToString());
            header.SetText(2, 1, "差异(亏):" + item.DiffCountLost.ToString());
            misGoldPrinter.Header     = header;
            misGoldPrinter.DataSource = DataGridViewUtil.ToStringArray(dataGridView2, true, true);
            if (!Directory.Exists(CommonGlobalUtil.SystemDir + "EXPORTS\\"))
            {
                Directory.CreateDirectory(CommonGlobalUtil.SystemDir + "EXPORTS\\");
            }

            misGoldPrinter.FileName = CommonGlobalUtil.SystemDir + "EXPORTS\\" + item.ID + ".jpg";
            ((GoldPrinter.Body)(misGoldPrinter.Body)).Font = dataGridView2.Font;
            int[] widths = new int[] {
                80, 100, 40, 50,
                30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30
                , 40, 50
            };
            // int[] widths=  DataGridViewUtil.GetColsWidth(dataGridView2);
            List <int> widthList = new List <int>();

            for (int i = 0; i <
                 dataGridView2.Columns.Count; i++)
            {
                if (dataGridView2.Columns[i].Visible)
                {
                    widthList.Add(widths[i]);
                }
            }
            widths = widthList.ToArray();
            int newWidth   = 787;
            int totalWidth = 0;

            for (int i = 0; i < widths.Length; i++)
            {
                totalWidth += widths[i];
            }
            for (int i = 0; i < widths.Length; i++)
            {
                widths[i] = decimal.ToInt32(Math.Round((widths[i] * newWidth * (decimal)1.0 / totalWidth), 0, MidpointRounding.AwayFromZero));
            }
            ((GoldPrinter.Body)(misGoldPrinter.Body)).ColsWidth = widths;
            misGoldPrinter.Preview();
            misGoldPrinter.Dispose();
            misGoldPrinter = null;
        }
Example #11
0
 private void BindingSource(SignRecordPage page)
 {
     if (page != null && page.SignRecords != null && page.SignRecords.Count > 0)
     {
         foreach (var item in page.SignRecords)
         {
             item.ShopName  = CommonGlobalCache.GetShopName(item.ShopID);
             item.GuideName = CommonGlobalCache.GetUserName(item.GuideID);
         }
     }
     //this.dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(page?.SignRecords), null, page?.TotalEntityCount, page?.SignRecordSum);
     this.dataGridViewPagingSumCtrl.BindingDataSource(page?.SignRecords, null, page?.TotalEntityCount, page?.SignRecordSum);
 }
Example #12
0
        private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            DataGridViewRow row = dataGridView1.Rows[e.RowIndex];
            //   row.ReadOnly = true;
            DayReport order = (DayReport)row.DataBoundItem;

            if (shopIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetShopName(order.ShopID);
            }

            DataGridViewUtil.CellFormatting_ReportShowZero(e, ReportShowZero);
        }
 /// <summary>
 /// 绑定数据
 /// </summary>
 /// <param name="view"></param>
 /// <param name="dayBenefitReportList"></param>
 private void BindingSource(DataGridView view, List <DayBenefitReport> dayBenefitReportList)
 {
     if (dayBenefitReportList != null)
     {
         foreach (var item in dayBenefitReportList)
         {
             item.ShopName         = CommonGlobalCache.GetShopName(item.ShopID);
             item.RefundRate       = Math.Abs(item.RefundRate);
             item.QuantityOfRefund = Math.Abs(item.QuantityOfRefund);
         }
     }
     dataGridViewPagingSumCtrl.BindingDataSource <DayBenefitReport>(DataGridViewUtil.ToDataTable(dayBenefitReportList));
 }
Example #14
0
 /// <summary>
 /// 绑定plenishOrderSource源到dataGridView中
 /// </summary>
 /// <param name="listPage"></param>
 private void BindingReplenishOrderSource(ReplenishCostumePage listPage)
 {
     if (listPage != null && listPage.ReplenishOrderList != null && listPage.ReplenishOrderList.Count > 0)
     {
         List <ReplenishOrder> details = listPage.ReplenishOrderList;
         foreach (var order in details)
         {
             order.ShopName  = CommonGlobalCache.GetShopName(order.ShopID);
             order.GuideName = CommonGlobalCache.GetUserName(order.RequestGuideID);
         }
         listPage.ReplenishOrderSum.CreateTime = default(DateTime);
     }
     this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.ReplenishOrderList, null, listPage?.TotalEntityCount, listPage?.ReplenishOrderSum);
     this.skinSplitContainer1.Panel2Collapsed = true;
 }
Example #15
0
 /// <summary>
 /// 绑定InboundOrder数据源
 /// </summary>
 /// <param name="listPage"></param>
 private void BindingInboundOrderSource(InboundOrderPage listPage)
 {
     if (listPage != null && listPage.InboundOrderList != null && listPage.InboundOrderList.Count > 0)
     {
         //将名称赋值,用于显示
         foreach (InboundOrder order in listPage.InboundOrderList)
         {
             order.GuideName    = CommonGlobalCache.GetUserName(order.OperatorUserID);
             order.DeskShopName = CommonGlobalCache.GetShopName(order.ShopID);
         }
     }
     this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.InboundOrderList, null, listPage?.TotalEntityCount, listPage?.InboundOrderSum);
     this.skinSplitContainer1.Panel2Collapsed = true;
     this.dataGridView1.Refresh();
 }
Example #16
0
        private void dataGridView_RefundOrder_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            DataGridViewRow row   = dataGridView_RefundOrder.Rows[e.RowIndex];
            RetailOrder     order = (RetailOrder)row.DataBoundItem;

            if (guideIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetUserName(order.GuideID);
            }
            else
            if (shopIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetShopName(order.ShopID);
            }
        }
Example #17
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;
        }
Example #18
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.调拨;
        }
Example #19
0
 private void Initialize()
 {
     if (this.curScrapOrder == null)
     {
         return;
     }
     try
     {
         this.skinTextBox_OrderID.Text = "报损单号:" + this.curScrapOrder.ID;
         this.skinLabel_ShopName.Text  = "店铺名称:" + CommonGlobalCache.GetShopName(this.curScrapOrder.ShopID);
         this.skinLabel_Remark.Text    = this.curScrapOrder.Remarks;
         List <BoundDetail> list = CommonGlobalCache.ServerProxy.GetOutboundDetail(this.curScrapOrder.OutboundOrderID);
         this.BindingInboundDetailSource(list);
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
Example #20
0
        private void Initialize()
        {
            skinLabel_createDate.Text = order.CreateTime.ToString();
            skinLabel_memberID.Text   = order.MemeberID;
            skinLabel_totalCount.Text = order.TotalCount.ToString();
            //     skinLabel_totalMoney.Text = order.TotalPrice.ToString();
            skinLabel_totalMoney.Text           = order.TotalMoneyReceived.ToString();
            skinLabel_orderID.Text              = order.ID;
            skinLabel_shop.Text                 = CommonGlobalCache.GetShopName(order.ShopID);
            linkLabel_retailOrderID.Text        = order.OriginOrderID;
            skinLabel_remark.Text               = order.Remarks;
            skinLabelWeixin.Text                = order.MoneyWeiXin.ToString();
            this.skinLabel_MoneyCash.Text       = order.MoneyCash.ToString();
            this.skinLabel_MoneyStoredCard.Text = order.MoneyVipCard.ToString();
            //   this.skinLabel_RefundAll.Text = order.RefundAll ? "是" : "否";
            this.skinLabel_MoneyIntegration.Text = order.MoneyIntegration.ToString();

            skinLabel_guide.Text = CommonGlobalCache.GetUserName(order.GuideID);
        }
Example #21
0
 //绑定数据源
 private void BindingDataSource(RetailListPage page)
 {
     if (page != null)
     {
         retailOrderList = page.ResultList;
     }
     if (this.retailOrderList != null && this.retailOrderList.Count != 0)
     {
         foreach (RetailOrder order in this.retailOrderList)
         {
             order.GuideName = CommonGlobalCache.GetUserName(order.GuideID);
             order.ShopName  = CommonGlobalCache.GetShopName(order.ShopID);
         }
     }
     if (page != null)
     {
         retailOrderList = page.ResultList;
     }
     dataGridViewPagingSumCtrl.BindingDataSource(this.retailOrderList, null, page.TotalEntityCount, page.RetailOrderSum);
 }
Example #22
0
 private void BindingSource(CostumeStoreInfoSum listPage)
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke(new CbGeneric <CostumeStoreInfoSum>(this.BindingSource), listPage);
     }
     else
     {
         if (listPage != null)
         {
             foreach (var item in listPage.CostumeStores)
             {
                 //  item.CostumeName = CommonGlobalCache.GetCostumeName(item.CostumeID);
                 item.ShopName = CommonGlobalCache.GetShopName(item.ShopID);
             }
         }
         dataGridViewPagingSumCtrl.BindingDataSource <CostumeStore>(DataGridViewUtil.ListToBindingList(listPage?.CostumeStores), true, listPage?.CostumeStoreSum);
         CompleteProgressForm();
     }
 }
 private void BindingCheckStoreSummaryBindingSource(CheckStoreSummaryPage listPage)
 {
     if (listPage != null && listPage.CheckStoreSummarys != null && listPage.CheckStoreSummarys.Count > 0)
     {
         foreach (CheckStoreSummary order in listPage.CheckStoreSummarys)
         {
             Costume costume = CommonGlobalCache.CostumeList.Find(t => t.ID == order.CostumeID);
             if (costume != null)
             {
                 order.Price       = costume.Price;
                 order.CostPrice   = costume.CostPrice;
                 order.CostumeName = costume.Name;
                 order.ShopName    = CommonGlobalCache.GetShopName(order.ShopID);
             }
         }
     }
     this.skinSplitContainer1.Panel2Collapsed = true;
     dataGridView1.CellValueChanged          -= dataGridView1_CellValueChanged;
     this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.CheckStoreSummarys, null, listPage?.TotalEntityCount, listPage?.CheckStoreSummarySum);
     dataGridView1.CellValueChanged += dataGridView1_CellValueChanged;
 }
Example #24
0
        private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            if (e.ColumnIndex < 0 || e.RowIndex < 0)
            {
                return;
            }
            DataGridViewRow  row  = dataGridView1.Rows[e.RowIndex];
            DataGridViewCell cell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];

            AllocateOrder order = (AllocateOrder)row.DataBoundItem;

            if (stateNameDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
            }
            else if (column_operation.Index == e.ColumnIndex)
            {
                if (e.Value == null)
                {
                    return;
                }


                if (order.State != (byte)AllocateOrderState.Delivery && order.State != (byte)AllocateOrderState.OverrideOrder)
                {
                    e.Value = null;
                }
            }
            else if (SourceShopName.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetShopName(order.SourceShopID);
            }
            else if (DestShopName.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetShopName(order.DestShopID);
            }
            else if (GuideName.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetUserName(order.SourceUserID);
            }
        }
Example #25
0
        private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            DataGridViewRow row   = dataGridView1.Rows[e.RowIndex];
            CashRecord      order = (CashRecord)row.DataBoundItem;

            if (shopIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetShopName(order.ShopID);
            }
            else if (createTimeDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                createTimeDataGridViewTextBoxColumn.DefaultCellStyle.Format = DateTimeUtil.DEFAULT_DATETIME_FORMAT;
            }
            else if (operatorUserIDDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalCache.GetUserName(order.OperatorUserID);
            }
            else if (feeTypeDataGridViewTextBoxColumn.Index == e.ColumnIndex)
            {
                e.Value = CommonGlobalUtil.GetFeeTypeName(order.FeeType);
            }
        }
Example #26
0
 private void Initialize()
 {
     if (this.curReturnOrder == null)
     {
         return;
     }
     try
     {
         this.skinTextBox_OrderID.Text = "采购单号:" + this.curReturnOrder.ID;
         this.skinLabel_ShopName.Text  = "店铺名称:" + CommonGlobalCache.GetShopName(this.curReturnOrder.DestShopID);
         skinLabelRemarks.Text         = "备注:" + curReturnOrder.Remarks;
         List <BoundDetail> list = CommonGlobalCache.ServerProxy.GetOutboundDetail(this.curReturnOrder.InboundOrderID);
         if (curReturnOrder.IsReturnType)
         {
             SalePrice.Visible = false;
         }
         this.BindingOutboundDetailSource(list);
     }
     catch (Exception ee)
     {
         CommonGlobalUtil.ShowError(ee);
     }
 }
Example #27
0
        public PurchaseOrderPickForm(bool isPurchase)
        {
            InitializeComponent();
            dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(this.dataGridView1);
            dataGridViewPagingSumCtrl.ShowRowCounts = false;
            dataGridViewPagingSumCtrl.Initialize();
            dataGridViewPagingSumCtrl1 = new DataGridViewPagingSumCtrl(this.dataGridView2);
            dataGridViewPagingSumCtrl1.ShowRowCounts = false;
            dataGridViewPagingSumCtrl1.Initialize();
            GetHangUpPurchasesPara para = new GetHangUpPurchasesPara()
            {
                IsPurchase = isPurchase
            };

            if (isPurchase)
            {
                this.Text = "采购进货单提单";
            }
            else
            {
                this.Text = "采购退货单提单";
            }

            orders = GlobalCache.ServerProxy.GetHangUpPurchases(para);
            if (orders != null)
            {
                foreach (var item in orders)
                {
                    item.SupplierName = CommonGlobalCache.GetSupplierName(item.SupplierID);
                    item.UserName     = CommonGlobalCache.GetUserName(item.AdminUserID);
                    item.ShopName     = CommonGlobalCache.GetShopName(item.DestShopID);
                }
            }

            dataGridViewPagingSumCtrl.BindingDataSource(orders);
        }
Example #28
0
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                GetGuideDayAchievementsPara pagePara = new GetGuideDayAchievementsPara()
                {
                    ReportDate = curDayReport.ReportDate,
                    ShopID     = curDayReport.ShopID
                };
                List <GuideDayAchievement> listPage = CommonGlobalCache.ServerProxy.GetGuideDayAchievements(pagePara);
                //如果是今天的那么返回实时的如果不是调用原数据接口
                foreach (GuideDayAchievement item in listPage)
                {
                    item.GuideName = CommonGlobalCache.GetUserName(item.GuideID);
                    item.ShopName  = CommonGlobalCache.GetShopName(item.ShopID);
                }

                this.dataGridView1.DataSource  = null;
                SalesCountSum.DataPropertyName = "SalesCount";
                quantityOfSaleSumDataGridViewTextBoxColumn.DataPropertyName = "QuantityOfSale";
                moneyOfSaleSumDataGridViewTextBoxColumn.DataPropertyName    = "MoneyOfSale";
                this.dataGridView1.DataSource = listPage;
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
        public void Initialize(DifferenceOrder differenceOrder = null)
        {
            this.skinLabel_OrderID.Text = string.Empty;
            if (this.models != null)
            {
                this.models.Clear();
            }
            else
            {
                this.models = new List <DifferenceDetailConfirmModel>();
            }

            SetDisplay();
            //如果调拨单
            if (CommonGlobalUtil.OrderType(differenceOrder?.SourceOrderID).Equals("调拨"))
            {
                bool canEdit = HasPermission(RolePermissionEnum.编辑);
                baseButtonConfirm.Enabled = canEdit;
                BaseButtonCancel.Enabled  = canEdit;
                if (differenceOrder.Confirmed)
                {
                    baseButtonConfirm.Visible = false;
                    BaseButtonCancel.Visible  = false;
                }
            }
            else
            {
                baseButtonConfirm.Visible = false;
                BaseButtonCancel.Visible  = false;
            }

            if (differenceOrder != null)
            {
                this.curDifferenceOrder = differenceOrder;
            }

            this.skinLabel_SendShop.Visible    = false;
            this.skinLabel_ReceiveShop.Visible = false;
            this.skinLabel_operator.Visible    = false;
            if (this.curDifferenceOrder != null)
            {
                //  盘点单店铺不是本店的  和  差异单发货方不是本店的  不可以确认差异
                skinLabel_operator.Visible  = false;
                this.guideComboBox1.Visible = false;

                this.skinLabel_OrderID.Text     = "差异单号:" + this.curDifferenceOrder.ID;
                this.skinLabel_SendShop.Text    = "发货方:" + CommonGlobalCache.GetShopName(this.curDifferenceOrder.OutboundShopID);
                this.skinLabel_ReceiveShop.Text = "收货方:" + CommonGlobalCache.GetShopName(this.curDifferenceOrder.InboundShopID);
                this.skinLabel_operator.Text    = "操作人:" + CommonGlobalCache.GetUserName(this.curDifferenceOrder.ConfirmUserID);
                if (this.curDifferenceOrder.InboundShopID == this.curDifferenceOrder.OutboundShopID)
                {
                    this.isCheckStoreOrder = true;

                    if (!LoadSnagShot())
                    {
                        return;
                    }
                    outboundCountDataGridViewTextBoxColumn.HeaderText = "账面数";
                    inboundCountDataGridViewTextBoxColumn.HeaderText  = "实盘数";
                    this.skinLabel_SendShop.Visible    = false;
                    this.skinLabel_ReceiveShop.Visible = false;
                    this.checkStoreDetails             = CommonGlobalCache.ServerProxy.GetCheckStoreDetail(this.curDifferenceOrder.SourceOrderID);
                }
                else
                {
                    //this.BaseButtonCancel.Visible = !curDifferenceOrder.Confirmed;
                    //this.baseButtonConfirm.Visible = !curDifferenceOrder.Confirmed;
                    // this.guideComboBox1.Visible = !curDifferenceOrder.Confirmed && IsPos;
                    this.skinLabel_SendShop.Visible    = true;
                    this.skinLabel_ReceiveShop.Visible = true;
                    //this.skinLabel_operator.Visible = true;
                    this.inboundDetails = CommonGlobalCache.ServerProxy.GetInboundDetail(this.curDifferenceOrder.InboundOrderID);
                }

                if (curDifferenceOrder?.OutboundShopID != CommonGlobalCache.CurrentShopID)
                {
                    this.BaseButtonCancel.Visible   = false;
                    this.baseButtonConfirm.Visible  = false;
                    this.guideComboBox1.Visible     = false;
                    this.skinLabel_operator.Visible = false;
                }

                List <DifferenceDetail> differenceDetails = CommonGlobalCache.ServerProxy.GetDifferenceDetail(this.curDifferenceOrder.ID);
                if (differenceDetails != null)
                {
                    foreach (DifferenceDetail detail in differenceDetails)
                    {
                        foreach (string sizeName in CostumeStoreHelper.CostumeSizeColumn)
                        {
                            String dbSize          = sizeName; //CostumeStoreHelper.GetCostumeSize(sizeName, sizeGroup);
                            int    differenceCount = Convert.ToInt32(CJBasic.Helpers.ReflectionHelper.GetProperty(detail, sizeName));

                            if (differenceCount != 0)
                            {
                                //实盘
                                int inboundCount  = this.GetInboundCount(differenceCount, detail, dbSize);
                                int outboundCount = 0;
                                //变化数
                                int changeCount = 0;
                                if (isCheckStoreOrder)
                                {
                                    //盘点单,库存数=盘点数-差异数
                                    changeCount   = this.GetChangeCount(detail, dbSize);
                                    outboundCount = this.GetOutboundCount(detail, dbSize);;
                                }
                                else
                                {
                                    //调拨、补货
                                    outboundCount = inboundCount + differenceCount;
                                }

                                DifferenceDetailConfirmModel model = new DifferenceDetailConfirmModel()
                                {
                                    CostumeID       = detail.CostumeID,
                                    CostumeName     = CommonGlobalCache.GetCostumeName(detail.CostumeID),
                                    ColorName       = detail.ColorName,
                                    SizeName        = dbSize,
                                    DifferenceCount = differenceCount,
                                    InboundCount    = inboundCount,
                                    OutboundCount   = outboundCount,
                                    ChangeCount     = changeCount
                                };
                                this.models.Add(model);
                            }
                        }
                    }
                }
            }
            this.BindingSource();
        }
Example #30
0
        private void BindingSource()
        {
            //  if (!String.IsNullOrEmpty(curDayReport.EMallShopID) && curDayReport.EMallShopID == CommonGlobalCache.CurrentShopID)
            //{
            this.skinToolTip1.SetToolTip(this.skinLabel_QuantityOfSale, "线下" + curDayReport.QuantityOfSale + "件,线上" + curDayReport.EmQuantityOfSale + "件");
            skinLabel_QuantityOfSale.ForeColor = Color.Blue;
            this.skinToolTip1.SetToolTip(this.skinLabel_QuantityOfRefund, "线下" + (curDayReport.QuantityOfRefund * -1) + "件,线上" + (curDayReport.EmQuantityOfRefund * -1) + "件");
            skinLabel_QuantityOfRefund.ForeColor = Color.Blue;
            //  }

            //   this.skinLabel_State.Text = "状态:" + (this.curDayReport.ManualConfirm ? "已结存" : "未结存");
            this.skinLabel_shop.Text         = "店铺:" + CommonGlobalCache.GetShopName(curDayReport.ShopID);
            this.skinLabel_Operator.Text     = "操作人:" + CommonGlobalCache.GetUserName(curDayReport.AdminUserID);
            this.skinLabelDate.Text          = "日期:" + curDayReport.ReportDate;
            this.skinLabel_SalesCount.Text   = ValidateUtil.ZeroToEmpty(curDayReport.SalesCount.ToString(), reportShowZero);
            this.skinLabel_RefundCount.Text  = ValidateUtil.ZeroToEmpty(curDayReport.RefundCount.ToString(), reportShowZero);
            skinLabel_NotConfirmedCount.Text = "未确认单据:" + ValidateUtil.ZeroToEmpty(curDayReport.NotConfirmedCount.ToString(), reportShowZero);
            this.richTextBox_Remark.Text     = curDayReport.Remarks;
            ///库存
            this.skinLabel_PreTotalCount.Text  = ValidateUtil.ZeroToEmpty(curDayReport.PreTotalCount.ToString(), reportShowZero);
            skinLabel_PurchaseInCount.Text     = ValidateUtil.ZeroToEmpty(curDayReport.PurchaseInCount.ToString(), reportShowZero);
            skinLabel_AllocateInCount.Text     = ValidateUtil.ZeroToEmpty(curDayReport.AllocateInCount.ToString(), reportShowZero);
            skinLabel_CheckStoreLostCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.CheckStoreLostCount.ToString(), reportShowZero);
            skinLabel_CheckStoreWinCount.Text  = ValidateUtil.ZeroToEmpty(curDayReport.CheckStoreWinCount.ToString(), reportShowZero);
            skinLabel_AllocateOutCount.Text    = ValidateUtil.ZeroToEmpty(curDayReport.AllocateOutCount.ToString(), reportShowZero);
            skinLabel_returnCount.Text         = ValidateUtil.ZeroToEmpty(curDayReport.ReturnCount.ToString(), reportShowZero);
            //  skinLabel_DiffAdjustCount.Text = ValidateUtil.ZeroToEmpty(curDayReport.DiffAdjustCount.ToString(), reportShowZero);
            skinLabel_ScrapOutCount.Text    = ValidateUtil.ZeroToEmpty(curDayReport.ScrapOutCount.ToString(), reportShowZero);
            skinLabel_QuantityOfSale.Text   = (curDayReport.QuantityOfSale + curDayReport.EmQuantityOfSale).ToString();
            skinLabel_TotalCount.Text       = ValidateUtil.ZeroToEmpty(curDayReport.TotalCount.ToString(), reportShowZero);
            skinLabel_PreCash.Text          = ValidateUtil.ZeroToEmpty(curDayReport.PreCash.ToString(), reportShowZero);
            skinLabel_CashCurrent.Text      = ValidateUtil.ZeroToEmpty(curDayReport.CashCurrent.ToString(), reportShowZero);
            skinLabel_CashDeliverUp.Text    = ValidateUtil.ZeroToEmpty(Math.Abs(curDayReport.CashDeliverUp).ToString(), reportShowZero);
            skinLabel_CashOut.Text          = ValidateUtil.ZeroToEmpty(Math.Abs(curDayReport.CashOut).ToString(), reportShowZero);
            skinLabel_RechargeInCash.Text   = ValidateUtil.ZeroToEmpty(curDayReport.RechargeInCash.ToString(), reportShowZero);
            skinLabel_SalesInCash.Text      = ValidateUtil.ZeroToEmpty(curDayReport.SalesInCash.ToString(), reportShowZero);
            skinLabel_QuantityOfRefund.Text = ValidateUtil.ZeroToEmpty((curDayReport.QuantityOfRefund * -1 + curDayReport.EmQuantityOfRefund * -1).ToString(), reportShowZero);
            skinLabel_RefundInCash.Text     = ValidateUtil.ZeroToEmpty((curDayReport.RefundInCash * -1).ToString(), reportShowZero);
            //  skinLabel_Revenue.Text = curDayReport.Revenue.ToString();
            skinLabel_CashInOthers.Text = ValidateUtil.ZeroToEmpty(curDayReport.CashInOthers.ToString(), reportShowZero);



            skinLabelPdDeliver.Text = ValidateUtil.ZeroToEmpty(curDayReport.PfDeliveryCount.ToString(), reportShowZero);
            skinLabelPfReturn.Text  = ValidateUtil.ZeroToEmpty(curDayReport.PfReturnCount.ToString(), reportShowZero);
            //if (CommonGlobalUtil.IsPfEnable() && curDayReport.ShopID == CommonGlobalCache.GeneralStoreShopID)
            //{
            //    panelPf.Visible = true;
            //}
            //else {
            //    panelPf.Visible = false;
            //}

            DayReport[] reportDetails = new DayReport[] { curDayReport };
            //  this.dataGridView1.DataSource = reportDetails;
            //   this.dataGridView2.DataSource = reportDetails;


            List <DayReport> reports = new List <DayReport>();
            // reports.Add(curDayReport);
            //充值
            DayReport cz = new DayReport();

            cz.SalesInAlipay     = curDayReport.RechargeInAlipay;
            cz.SalesInBankCard   = curDayReport.RechargeInBankCard;
            cz.SalesInCash       = curDayReport.RechargeInCash;
            cz.SalesInWeiXin     = curDayReport.RechargeInWeiXin;
            cz.TotalRecharge     = curDayReport.TotalRecharge;
            cz.SalesInGiftTicket = curDayReport.SalesInGiftTicket;
            cz.SalesInMoneyOther = curDayReport.SalesInMoneyOther;
            reports.Add(cz);
            //收入
            DayReport sr = new DayReport();

            sr.SalesInAlipay         = curDayReport.SalesInAlipay;
            sr.SalesInBankCard       = curDayReport.SalesInBankCard;
            sr.SalesInCash           = curDayReport.SalesInCash;
            sr.SalesInWeiXin         = curDayReport.SalesInWeiXin;
            sr.SalesInVipBalance     = curDayReport.SalesInVipBalance;
            sr.SalesInVipIntegration = curDayReport.SalesInVipIntegration;
            sr.TotalRecharge         = curDayReport.SalesTotalMoney;
            sr.SalesInGiftTicket     = curDayReport.SalesInGiftTicket;
            sr.SalesInMoneyOther     = curDayReport.SalesInMoneyOther;
            reports.Add(sr);
            //退货

            DayReport refund = new DayReport();

            refund.SalesInCash           = curDayReport.RefundInCash;
            refund.SalesInVipBalance     = curDayReport.RefundInVipBalance;
            refund.SalesInVipIntegration = curDayReport.RefundInVipIntegration;
            refund.TotalRecharge         = curDayReport.RefundTotalMoney;
            refund.SalesInBankCard       = curDayReport.RefundInBankCard;
            refund.SalesInWeiXin         = curDayReport.RefundInWeiXin;
            refund.SalesInAlipay         = curDayReport.RefundInAlipay;
            refund.SalesInMoneyOther     = curDayReport.SalesInMoneyOther;
            reports.Add(refund);
            //小计
            DayReport sum = new DayReport();

            sum.SalesInCash           = sr.SalesInCash + cz.SalesInCash + refund.SalesInCash;
            sum.SalesInAlipay         = sr.SalesInAlipay + cz.SalesInAlipay + refund.SalesInAlipay;
            sum.SalesInBankCard       = sr.SalesInBankCard + cz.SalesInBankCard + refund.SalesInBankCard;
            sum.SalesInWeiXin         = sr.SalesInWeiXin + cz.SalesInWeiXin + refund.SalesInWeiXin;
            sum.SalesInVipBalance     = sr.SalesInVipBalance + cz.SalesInVipBalance + refund.SalesInVipBalance;
            sum.SalesInVipIntegration = sr.SalesInVipIntegration + cz.SalesInVipIntegration + refund.SalesInVipIntegration;
            sum.TotalRecharge         = sr.TotalRecharge + cz.TotalRecharge + refund.TotalRecharge;
            sum.SalesInGiftTicket     = sr.SalesInGiftTicket;
            refund.SalesInMoneyOther  = sr.SalesInMoneyOther + cz.SalesInMoneyOther + refund.SalesInMoneyOther;
            reports.Add(sum);
            yysr  = sr;
            czmx  = cz;
            total = sum;
            this.dataGridView2.DataSource = reports;

            skinLabel_Donate4Recharge.Text = "赠送金额:" + curDayReport.Donate4Recharge;
        }