Exemplo n.º 1
0
        private void Initialize()
        {
            if (this.curInboundOrder == null)
            {
                return;
            }
            try
            {
                SourceOrderPartialDetail sourceOrderPartialDetail = CommonGlobalUtil.GetSourceOrderPartialDetail(this.curInboundOrder.SourceOrderID);

                string operatorName = CommonGlobalCache.GetUserName(this.curInboundOrder.OperatorUserID);

                this.skinLabel3.Text = this.curInboundOrder.ID;
                this.skinLabel1.Text = this.curInboundOrder.Remarks.ToString();
                if (this.curDateTime != "")
                {
                    this.skinLabel6.Text = this.curDateTime.ToString();
                }
                else
                {
                    this.skinLabel6.Text = "";
                    this.skinLabel4.Text = "";
                }

                List <BoundDetail> list = CommonGlobalCache.ServerProxy.GetInboundDetail(this.curInboundOrder.ID);
                this.BindingInboundDetailSource(list);
            }
            catch (Exception ee)
            {
                CommonGlobalUtil.ShowError(ee);
            }
        }
Exemplo n.º 2
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);
                    }
                }
            }
            catch { }
        }
Exemplo n.º 3
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();
        }
Exemplo n.º 4
0
        private void skinTabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (skinTabControl1.SelectedTab.Name == "skinTabPage4")
            {
                if (CommonGlobalCache.CurrentUser.Type == UserInfoType.Guide)
                {
                    Guide item = new Guide();
                    item.Name = CommonGlobalCache.GetUserName(CommonGlobalCache.CurrentUserID);
                    item.ID   = CommonGlobalCache.CurrentUserID;

                    GuideCtrl guideCtrl = new GuideCtrl();
                    string    tabName   = "导购员密码";
                    changePasswordGuidCtrl1 = new ChangePasswordGuideOfSystemCtrl(item);
                    this.changePasswordAdminUserCtrl1.Visible = false;

                    this.skinTabPage4.Controls.Add(changePasswordGuidCtrl1);
                    this.changePasswordGuidCtrl1.Visible = true;
                }
                else
                {
                    this.changePasswordAdminUserCtrl1.Visible = true;
                    if (changePasswordGuidCtrl1 != null)
                    {
                        this.changePasswordGuidCtrl1.Visible = false;
                    }
                }
            }
        }
Exemplo n.º 5
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);
        }
Exemplo n.º 6
0
 private void SetGuideName()
 {
     foreach (RechargeRecord record in this.rechargeRecordList)
     {
         record.GuideName = CommonGlobalCache.GetUserName(record.GuideID);
     }
 }
Exemplo n.º 7
0
        private void Initialize()
        {
            CleanRechargeTextBox();

            /* if (!IsPos)
             * {
             *   this.member = null;
             * }*/
            this.SetMemberLabel();

            if (IsPos)
            {
                this.guideComboBox1.Initialize(GuideComboBoxInitializeType.Null, CommonGlobalCache.CurrentShopID);
                this.guideComboBox1.Visible     = false;
                this.skinlblUserName.Text       = CommonGlobalCache.GetUserName(CommonGlobalCache.CurrentUserID);
                this.skinLabel_Operator.Visible = false;
                this.skinlblUserName.Visible    = false;
                //this.skinLabel_Operator.Size(Height += skinLabel_Rules.Height;
                // this.skinLabel_Operator.Size = new System.Drawing.Size(this.skinLabel_Operator.Size.Width, this.skinLabel_Operator.Height+ skinLabel_Rules.Height* shopRule.Rules.Count);
                // this.skinLabel_Operator.Location = new System.Drawing.Point(this.skinLabel_Operator.Location.X, this.skinLabel_Operator.Location.Y- skinLabel_Rules.Height * shopRule.Rules.Count);
                // GlobalMessageBox.Show(skinLabel_Rules.Height.ToString());
            }
            else
            {
                this.guideComboBox1.Visible = false;
                skinLabel_Operator.Visible  = false;
                //  this.skinlblUserID.Visible = false;
                this.skinlblUserName.Visible = false;
            }

            guideID   = IsPos ? CommonGlobalCache.CurrentUserID : CommonGlobalCache.CurrentUserID;
            this.shop = CommonGlobalCache.CurrentShop;
            this.memberIDTextBox1.MemberSelected += MemberIDTextBox1_MemberSelected;
            this.memberIDTextBox1.CheckMember     = true;
            string rules = "";

            //if (IsPos)
            //{

            shopRule = CommonGlobalCache.RechargeDonateRule;
            //}
            //else
            //{
            //    shopRule = CommonGlobalCache.RechargeDonateRule(shop.RechargeRuleID);
            //}

            CommonGlobalUtil.RechargeDonateRuleSort(shopRule);
            if (shopRule != null)
            {
                if (shopRule.Rules != null && shopRule.Rules.Count > 0)
                {
                    foreach (Rule rule in shopRule.Rules)
                    {
                        rules += rule.ToString() + "\r\n";
                    }
                }
            }
            this.skinLabel_Rules.Text = rules;
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 9
0
 /// <summary>
 /// 将集合中GuideName赋值
 /// </summary>
 /// <param name="memberList"></param>
 private void SetMemberOtherValue(List <Member> memberList)
 {
     foreach (Member member in memberList)
     {
         member.GuideName = CommonGlobalCache.GetUserName(member.GuideID);
         Shop shop = CommonGlobalCache.GetShop(member.ShopID);
         // member.ShopName = shop == null ? "" : shop.Name;
     }
 }
 /// <summary>
 /// 将集合中GuideName赋值
 /// </summary>
 /// <param name="ConfusedStoreAdjustRecordList"></param>
 private void SetConfusedStoreAdjustRecordOtherValue(List <ConfusedStoreAdjustRecord> ConfusedStoreAdjustRecordList)
 {
     foreach (ConfusedStoreAdjustRecord ConfusedStoreAdjustRecord in ConfusedStoreAdjustRecordList)
     {
         ConfusedStoreAdjustRecord.OperatorUserName = CommonGlobalCache.GetUserName(ConfusedStoreAdjustRecord.OperatorUserID);
         Shop shop = CommonGlobalCache.GetShop(ConfusedStoreAdjustRecord.ShopID);
         ConfusedStoreAdjustRecord.ShopName = shop == null ? "" : shop.Name;
     }
 }
Exemplo n.º 11
0
        private void BaseButtonCancel_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.guideComboBox1.Visible && this.guideComboBox1.SelectedIndex == 0)
                {
                    GlobalMessageBox.Show("操作人不能为空");
                    return;
                }
                if (GlobalMessageBox.Show("是否确认操作?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
                {
                    return;
                }
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                InteractResult result = CommonGlobalCache.ServerProxy.CancelDifferenceOrder(this.curDifferenceOrder.ID);
                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    GlobalMessageBox.Show("取消成功!");
                    if (IsPos)
                    {
                        this.guideComboBox1.Visible  = false;
                        this.skinLabel_operator.Text = "操作人:" + ((Guide)this.guideComboBox1.SelectedItem).Name;
                    }
                    else
                    {
                        this.skinLabel_operator.Text = "操作人:" + CommonGlobalCache.GetUserName(CommonGlobalCache.CurrentUser.ID);
                    }
                    this.BaseButtonCancel.Visible  = false;
                    this.baseButtonConfirm.Visible = false;
                    WorkDesk_Refresh?.Invoke(false, null);
                    this.RefreshPageAction?.Invoke(this.CurrentTabPage, this.SourceCtrlType);
                    break;

                case ExeResult.Error:
                    GlobalMessageBox.Show(result.Msg);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
 private void BindingDataSource(List <RechargeRecord> rechargeRecordList)
 {
     if (rechargeRecordList != null && rechargeRecordList.Count > 0)
     {
         foreach (RechargeRecord record in rechargeRecordList)
         {
             record.GuideName = CommonGlobalCache.GetUserName(record.GuideID);
         }
     }
     dataGridViewPagingSumCtrl1.BindingDataSource <RechargeRecord>(DataGridViewUtil.ToDataTable(rechargeRecordList));
 }
Exemplo n.º 13
0
 //绑定数据源
 private void BindingDataSource()
 {
     if (this.memberList != null && this.memberList.Count != 0)
     {
         foreach (Member member in this.memberList)
         {
             member.GuideName = CommonGlobalCache.GetUserName(member.GuideID);
         }
     }
     this.dataGridView1.DataSource = null;
     this.dataGridView1.DataSource = this.memberList;
 }
Exemplo n.º 14
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);
 }
Exemplo n.º 15
0
        /// <summary>
        /// 设置并绑定左边的Member源
        /// </summary>
        private void SetLeftDataSource()
        {
            this.dataGridView1.DataSource = null;
            if (this.currentLeftMembers != null && this.currentLeftMembers.Count > 0)
            {
                foreach (var member in currentLeftMembers)
                {
                    member.GuideName = CommonGlobalCache.GetUserName(member.GuideID);
                }

                this.dataGridView1.DataSource = currentLeftMembers;
            }
            this.dataGridView1.Refresh();
        }
Exemplo n.º 16
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();
 }
Exemplo n.º 17
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);
            }
        }
Exemplo n.º 18
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.º 19
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;
 }
Exemplo n.º 20
0
        /// <summary>
        /// 绑定RefundDetail数据源
        /// </summary>
        private void BindingRefundDetailDataSource(MonthTaskSearch search, int index)
        {
            skinSplitContainer1.Panel2Collapsed = false;
            // this.dataGridView_RefundDetail.DataSource = null;
            if (search != null && index != -1)
            {
                monthGuideTaskList = new List <MonthTask>();
                int month             = int.Parse((search.Year.ToString() + (index < 10 ? "0" + index : index.ToString())));
                GetMonthTaskPara para = new GetMonthTaskPara()
                {
                    GuideID = null,
                    ShopID  = search?.Shop?.ID,
                    Year    = search.Year,
                    Month   = month
                };
                monthGuideTaskList = CommonGlobalCache.ServerProxy.GetMonthTasks(para);
                if (monthGuideTaskList != null && monthGuideTaskList.Count > 0)
                {
                    foreach (MonthTask detail in monthGuideTaskList)
                    {
                        detail.GuideName = CommonGlobalCache.GetUserName(detail.GuideID);
                    }
                }


                moneyOfSaleDataGridViewTextBoxColumn.ReadOnly = index < DateTime.Now.Month && Decimal.ToInt32(numericUpDown_year.Value) <= DateTime.Now.Year;
                //设置日目标
                bool isEditable = !(index < DateTime.Now.Month && Decimal.ToInt32(numericUpDown_year.Value) <= DateTime.Now.Year);
                ColumnSetting2.Text = isEditable ? "设置日目标" : string.Empty;
                if (HasPermission(RolePermissionEnum.编辑))
                {
                    if (moneyOfSaleDataGridViewTextBoxColumn.ReadOnly)
                    {
                        moneyOfSaleDataGridViewTextBoxColumn.DefaultCellStyle.ForeColor = Color.DarkGray;
                    }
                    else
                    {
                        moneyOfSaleDataGridViewTextBoxColumn.DefaultCellStyle.ForeColor = Color.Black;
                    }
                }

                //绑定之后设置过期单元格只读
                //foreach(dataGridView_RefundDetail.Rows)
            }

            dataGridViewPagingSumCtrlDetail.BindingDataSource(monthGuideTaskList);
            //  dataGridViewPagingSumCtrlDetail.BindingDataSource(refundDetailList);
        }
Exemplo n.º 21
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;
        }
Exemplo n.º 22
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);
        }
Exemplo n.º 23
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);
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 25
0
        private void Initialize()
        {
            if (this.curCheckStoreOrder == null)
            {
                return;
            }
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                //增写主表单
                this.skinLabel_OrderID.Text    = this.curCheckStoreOrder.ID;
                this.skinLabel_CreateTime.Text = this.curCheckStoreOrder.CreateTime.ToString(DateTimeUtil.DEFAULT_DATETIME_FORMAT);
                if (this.curCheckStoreOrder.CheckTime != SystemDefault.DateTimeNull)
                {
                    this.skinLabel_approvedTime.Text = this.curCheckStoreOrder.CheckTime.ToString(DateTimeUtil.DEFAULT_DATETIME_FORMAT);
                }
                else
                {
                    this.skinLabel_approvedTime.Text = string.Empty;
                }
                this.skinLabel_Remarks.Text          = this.curCheckStoreOrder.Remarks;
                this.skinLabel_OperatorUserName.Text = CommonGlobalCache.GetUserName(this.curCheckStoreOrder.OperatorUserID);

                //待审核状态时显示审核按钮
                ShowButtons((CheckStoreOrderState)curCheckStoreOrder.State);
                List <CheckStoreDetail> list = CommonGlobalCache.ServerProxy.GetCheckStoreDetail(this.curCheckStoreOrder.ID);
                this.BindingCheckStoreDetailSource(list, (CheckStoreOrderState)curCheckStoreOrder.State);
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
Exemplo n.º 26
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);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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();
            }
        }
Exemplo n.º 29
0
        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();
        }
Exemplo n.º 30
0
        private void SetForm4MemberValue(bool isDetail = false)
        {
            if (_member == null)
            {
                skinComboBoxShop.Initialize(true);
                this.skinTextBox_ID.Text               = String.Empty;
                this.skinTextBox_Name.Text             = String.Empty;
                this.skinTextBox_WeiXin.Text           = String.Empty;
                this.skinComboBox_Source.SelectedIndex = 0;
                this.skinTextBox_IntroducerID.Text     = String.Empty;
                this.skinRadioButton1.Checked          = true;
                this.txttel.Text                         = String.Empty;
                this.dateTimePicker1.Value               = DateTime.Now;
                this.skinTextBox_Remark.Text             = String.Empty;
                textBoxDetailAddress.Text                = String.Empty;
                dateTimePickerCreateTime.Value           = DateTime.Now;
                skinComboBoxShop.SelectedValue           = CommonGlobalCache.CurrentShopID;
                this.skinTextBox_CurrentIntegration.Text = String.Empty;

                if (CommonGlobalCache.CurrentUser.Type == UserInfoType.Guide)
                {
                    this.guideComboBox1.SelectedValue = CommonGlobalCache.CurrentUserID;
                }
            }
            else
            {
                skinLabel_Operator.Visible             = true;
                this.skinTextBox_ID.Text               = this._member.PhoneNumber;
                this.skinTextBox_Name.Text             = this._member.Name;
                this.skinTextBox_WeiXin.Text           = this._member.WeiXin;
                skinComboBox_Source.Visible            = false;
                this.skinComboBox_Source.SelectedValue = this._member.Source;
                skinComboBox_Source.Visible            = true;
                this.skinTextBox_IntroducerID.Text     = this._member.IntroducerID;
                this.skinRadioButton1.Checked          = this._member.Sex;
                this.skinRadioButton2.Checked          = !this._member.Sex;
                this.txttel.Text                         = this._member.Phone;
                this.dateTimePicker1.Value               = this._member.Birthday;
                this.skinTextBox_Remark.Text             = this._member.Remarks;
                this.skinTextBox_CurrentIntegration.Text = this._member.CurrentIntegration.ToString();
                textBoxDetailAddress.Text                = this._member.DetailAddress;
                dateTimePickerCreateTime.Value           = this._member.CreatedTime;
                //    this.guideComboBox1.SelectedValue = this._member.GuideID;
                if (String.IsNullOrEmpty(this._member.ShopID))
                {
                    //  SetOnlineShop(skinComboBoxShop);

                    skinComboBoxShop.Initialize(true, false, true);
                    skinComboBoxShop.SelectedValue = SystemDefault.Report_Online;
                }
                else
                {
                    skinComboBoxShop.Initialize(true);
                    skinComboBoxShop.SelectedValue = this._member.ShopID;
                }

                skinComboBoxShop.Visible = true;
                // skinComboBoxShop.Refresh();
                //编辑的不能更改导购员了,以后只显示用
                // guideComboBox1.SelectedValue = this._member.GuideID;
                textBoxUserName.Visible = false;
                textBoxUserName.Enabled = false;
                textBoxUserName.Text    = CommonGlobalCache.GetUserName(this._member.GuideID);
                guideComboBox1.Initialize(GuideComboBoxInitializeType.MemberGuid, ValidateUtil.CheckEmptyValue(this.skinComboBoxShop.SelectedValue));
                this.guideComboBox1.SelectedValue = this._member.GuideID;
                LoadPic();
            }
        }