Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="para">内部调用的话不传</param>
        public void Search(RetailListPagePara para = null)
        {
            if (para != null)
            {
                this.pagePara = para;
                SetQueryCondition();
            }
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                Shop shop = this.skinComboBoxShopID.SelectedItem as Shop;
                retailOrderListCtrl2.RedoClick         = RedoClick;
                retailOrderListCtrl2.RefundDetailClick = RefundDetailClick;
                retailOrderListCtrl2.RetailDetailClick = RetailDetailClick;
                retailOrderListCtrl2.SourceCtrlType    = this;
                this.retailOrderListCtrl2.BindingSource(pagePara, shop.Name == SystemDefault.onlineName);
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
Ejemplo n.º 2
0
        public void Initialize()
        {
            if (skinSplitContainer1 != null)
            {
                skinSplitContainer1.Panel2Collapsed = true;
            }

            if (CommonGlobalCache.BusinessAccount != null && CommonGlobalCache.BusinessAccount.OnlineEnabled)
            {
                dataGridViewPagingSumCtrl.RemoveNotShowInColumnSettings(CarriageCost);
            }
            else
            {
                dataGridViewPagingSumCtrl.AppendNotShowInColumnSettings(CarriageCost);
            }

            createTimeDataGridViewTextBoxColumn.DefaultCellStyle.Format = DateTimeUtil.DEFAULT_DATETIME_FORMAT;
            if (dataGridViewPagingSumCtrl != null)
            {
                dataGridViewPagingSumCtrl.ColumnSorting = dataGridViewPagingSumCtrl_ColumnSorting;
                dataGridViewPagingSumCtrl.Clear();
            }
            this.dataGridView_RetailDetail.DataSource = null;
            this.pagePara = new RetailListPagePara();
            SetRetailOrderLabel(null);
        }
Ejemplo n.º 3
0
        //第7列为 编辑按钮    第8列为消费历史按钮
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (!DataGridViewUtil.CheckPerrmisson(this, sender, e))
            {
                return;
            }
            // MessageBox.Show(string.Format("当前点中的是第{0}列,第{1}行", e.ColumnIndex, e.RowIndex));
            if (e.RowIndex > -1 && e.ColumnIndex > -1)
            {
                List <Member> memberList = (List <Member>) this.dataGridView1.DataSource;

                switch (this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value)
                {
                case "编辑":
                    if (this.UpdateMemberClick != null)
                    {
                        this.UpdateMemberClick(memberList[e.RowIndex], this);
                    }
                    break;

                case "消费历史":
                    if (this.ConsumeHistoryClick != null)
                    {
                        RetailListPagePara para = new RetailListPagePara()
                        {
                            IsGetGeneralStore = true,
                            BrandID           = -1,
                            RetailOrderID     = null,
                            IsOpenDate        = false,
                            StartDate         = null,
                            EndDate           = null,
                            PageIndex         = 0,
                            CostumeID         = null,
                            PageSize          = int.MaxValue,
                            RetailOrderType   = RetailOrderType.All,
                            RetailOrderState  = RetailOrderState.IsNormal,
                            ShopID            = null,//所有店铺
                            RetailPayType     = RetailPayType.All,
                            MemberID          = memberList[e.RowIndex].PhoneNumber
                        };
                        this.ConsumeHistoryClick(para, this, true);
                    }
                    break;

                case "充值记录":
                    this.RechargeRecordClick?.Invoke(memberList[e.RowIndex], this);
                    break;

                case "优惠券":
                    this.MemberGiftTicketClick?.Invoke(memberList[e.RowIndex], this);
                    break;
                }
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="para"></param>
 /// <param name="showShop">只在POS端多加判断</param>
 public RetailOrderListCtrl(RetailListPagePara para, Boolean showShop = false, bool flag = false)
 {
     InitializeComponent();
     curFlag = flag;
     Init(true);
     this.pagePara = para;
     if (pagePara.PageSize != 0)
     {
         dataGridViewPagingSumCtrl.PageSize = pagePara.PageSize;
     }
     this.showShop = showShop;
 }
Ejemplo n.º 5
0
 public void ShowDialog(RetailListPagePara para)
 {
     try
     {
         this.TopMost = true;
         this.Show();
         ctrl.Search(para);
         this.TopMost = false;
     }
     catch (Exception ex)
     {
         CommonGlobalUtil.ShowError(ex);
     }
 }
Ejemplo n.º 6
0
        private void Initialize()
        {
            DateTimeUtil.DateTimePicker_Today(dateTimePicker_Start, dateTimePicker_End);
            this.pagePara = new RetailListPagePara();
            //20180530,销售退货单查询完关闭重新加载
            this.retailOrderListCtrl2.Initialize();

            if (HasPermission(RolePermissionEnum.打印))
            {
                retailOrderListCtrl2.ShowPrintColumn(true);
            }
            CommonGlobalUtil.SetBrand(skinComboBox_Brand);
            SetType();
            SetPayType();
            SetState(false);
        }
Ejemplo n.º 7
0
        //点击查询按钮
        private void BaseButton_Search_Click(object sender, EventArgs e)
        {
            string orderID = this.skinTextBox_OrderID.SkinTxt.Text.Trim();

            orderID = string.IsNullOrEmpty(orderID) ? null : orderID;
            string costumeID = this.CostumeCurrentShopTextBox1.SkinTxt.Text;

            costumeID = string.IsNullOrEmpty(costumeID) ? null : costumeID;
            bool isOpenDate = true;
            Date startDate  = new Date(this.dateTimePicker_Start.Value);
            Date endDate    = new Date(this.dateTimePicker_End.Value);

            string curBrandStr = ValidateUtil.CheckEmptyValue(this.skinComboBox_Brand.SelectedValue);
            int    curBrand    = 0;

            if (curBrandStr == null)
            {
                curBrand = 0;
            }
            else
            {
                curBrand = Convert.ToInt32(curBrandStr);
            }
            this.pagePara = new RetailListPagePara()
            {
                RetailOrderState = (RetailOrderState)this.skinComboBoxState.SelectedValue,
                RetailOrderID    = orderID,
                CostumeID        = costumeID,
                StartDate        = startDate,
                EndDate          = endDate,
                ClassID          = skinComboBoxBigClass.SelectedValue.ClassID,
                //SubSmallClass = skinComboBoxBigClass.SelectedValue?.SubSmallClass,
                BrandID           = curBrand,
                IsOpenDate        = isOpenDate,
                PageIndex         = 0,
                PageSize          = this.retailOrderListCtrl2.dataGridViewPagingSumCtrl.PageSize,
                RetailOrderType   = (RetailOrderType)this.skinComboBox_type.SelectedValue,
                IsGetGeneralStore = CommonGlobalCache.IsGeneralStoreRetail == "1",
                ShopID            = shopID,
                GuideID           = ValidateUtil.CheckEmptyValue(this.guideComboBox1.SelectedValue),
                RetailPayType     = (RetailPayType)this.brandComboBoxPayType.SelectedValue,
                IsOnlyNotPay      = skinCheckBoxNew.Checked,
                Remarks           = ValidateUtil.CheckEmptyValue(this.txtRemark.SkinTxt.Text),
            };
            Search();
        }
Ejemplo n.º 8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="para">内部调用的话不传</param>
        public void Search(RetailListPagePara para = null)
        {
            InteractResult <List <RetailOrder> > memberList = CommonGlobalCache.ServerProxy.GetReatilOrders(this.memberId, this.DateInt);


            // ListPage = CommonGlobalCache.ServerProxy.GetRetailListPage(pagePara);
            // this.dataGridViewPagingSumCtrl.Initialize(memberList);
            // this.BindingRetailOrderDataSource();

            /* if (para != null) {
             * this.pagePara = para;
             * SetQueryCondition();
             * }
             * try
             * {
             *  if (CommonGlobalUtil.EngineUnconnectioned(this))
             *  {
             *      return;
             *  }
             *
             *  Shop shop= this.skinComboBoxShopID.SelectedItem as Shop;
             *  retailOrderListCtrl2.RedoClick = RedoClick;
             *  retailOrderListCtrl2.RefundDetailClick = RefundDetailClick;
             *  retailOrderListCtrl2.RetailDetailClick = RetailDetailClick;
             *  retailOrderListCtrl2.SourceCtrlType = this;
             *  this.retailOrderListCtrl2.BindingSource(pagePara, shop.Name==SystemDefault.onlineName);
             * }
             * catch (Exception ee)
             * {
             *  CommonGlobalUtil.ShowError(ee);
             * }
             * finally
             * {
             *  CommonGlobalUtil.UnLockPage(this);
             * }*/
        }
Ejemplo n.º 9
0
 public void BindingSource(RetailListPagePara pagePara, bool isOnline)
 {
     this.isOnline = isOnline;
     this.pagePara = pagePara;
     Search();
 }