private void BaseButton_AddCostume_Click(object sender, EventArgs e)
        {
            try
            {
                int buyCount = int.Parse(this.skinTextBox_bugCount.SkinTxt.Text);
                //if (buyCount <= 0)
                //{
                //    GlobalMessageBox.Show("退货数量必须大于0!");
                //    return;
                //}

                PfCustomerRetailDetail detail = new PfCustomerRetailDetail()
                {
                    CostumeID   = this.currentSelectedItem.Costume.ID,
                    CostumeName = this.currentSelectedItem.Costume.Name,
                    ColorName   = this.skinComboBox_Color.Text,
                    SizeName    = ValidateUtil.CheckEmptyValue(this.skinComboBox_Size.SelectedValue),
                    // 显示自己设置的尺码组和对应的尺码列表
                    SizeDisplayName = CostumeStoreHelper.GetCostumeSizeName(ValidateUtil.CheckEmptyValue(this.skinComboBox_Size.SelectedValue), CommonGlobalCache.GetSizeGroup(this.currentSelectedItem.Costume.SizeGroupName)),
                    BuyCount        = buyCount,
                };

                if (!this.AddSelectedCostumeToList(detail))
                {
                    return;
                }
                dataGridViewPagingSumCtrl.BindingDataSource(this.PfCustomerRetailDetailList);
                this.skinTextBox_bugCount.SkinTxt.Text = "1";
            }
            catch (Exception ee)
            {
                CommonGlobalUtil.WriteLog(ee);
                GlobalMessageBox.Show("添加失败!");
            }
        }
Exemple #2
0
        /*private void BindingSource(List<PfCustomerStore> listPage)
         * {
         *  if (this.InvokeRequired)
         *  {
         *      this.BeginInvoke(new CbGeneric<List<PfCustomerStore>>(this.BindingSource), listPage);
         *  }
         *  else
         *  {
         *      if (listPage != null)
         *      {
         *          //foreach (var item in listPage)
         *          //{
         *          //  //  item.CostumeName = CommonGlobalCache.GetCostumeName(item.CostumeID);
         *          //    item.ShopName = CommonGlobalCache.GetShopName(item.ShopID);
         *          //}
         *      }
         *
         *      dataGridViewPagingSumCtrl.BindingDataSource<PfCustomerStore>(DataGridViewUtil.ListToBindingList(listPage));
         *      CompleteProgressForm();
         *  }
         * }*/


        private void BindingSource(List <PfCustomerStore> listPage)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new CbGeneric <List <PfCustomerStore> >(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 <PfCustomerStore>(DataGridViewUtil.ListToBindingList(listPage));
                CompleteProgressForm();
            }
        }
        /// <summary>
        /// 绑定RetailDetail数据源
        /// </summary>
        private void BindingRetailDetailDataSource( )
        {
            try
            {
                List <RetailDetail> retailDetailList = null;
                if (order == null)
                {
                    dataGridViewPagingSumCtrl.BindingDataSource(retailDetailList);
                }
                else
                {
                    retailDetailList = CommonGlobalCache.ServerProxy.GetRefundDetailList(order.ID);

                    if (retailDetailList != null && retailDetailList.Count > 0)
                    {
                        foreach (RetailDetail detail in retailDetailList)
                        {
                            detail.CostumeName     = CommonGlobalCache.GetCostumeName(detail.CostumeID);
                            detail.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(detail.CostumeID, detail.SizeName);
                        }
                        // this.dataGridView_Detail.DataSource = retailDetailList;
                    }
                    dataGridViewPagingSumCtrl.BindingDataSource(retailDetailList);
                }
            }
            catch (Exception ex)
            {
                ShowError(ex);
            }
            finally {
                UnLockPage();
            }
        }
Exemple #4
0
        public void Display()
        {
            try {
                if (CurItem != null)
                {
                    this.BaseButton3.Text                      = "保存";
                    this.skinTextBox_ID.Enabled                = false;
                    this.skinTextBox_ID.Text                   = this.CurItem.ID;
                    this.skinTextBox_Name.Text                 = this.CurItem.Name;
                    this.numericUpDown_Price.Value             = this.CurItem.Price;
                    this.numericUpDownCostPrice.Value          = this.CurItem.CostPrice;
                    numericTextBoxSalePrice.Value              = CurItem.SalePrice;
                    this.skinComboBox_SupplierID.SelectedValue = this.CurItem.SupplierID;
                    this.skinComboBox_Brand.SelectedValue      = this.CurItem.BrandID;
                    this.skinComboBox_Year.SelectedValue       = this.CurItem.Year;
                    if (this.CurItem.Season != null)
                    {
                        this.skinComboBox_Season.skinComboBox.SelectedValue = this.CurItem.Season;
                    }
                    this.selectSizeGroup = new SizeGroupSetting()
                    {
                        SizeGroup         = CommonGlobalCache.GetSizeGroup(this.CurItem.SizeGroupName),
                        SelectedSizeNames = this.CurItem.SizeNames
                    };
                    this.skinComboBoxBigClass.SelectedValue = this.CurItem;

                    if (this.CurItem.Remarks != null)
                    {
                        this.skinTextBox_Remarks.Text = this.CurItem.Remarks;
                    }

                    List <PfCustomerStore> stores = new List <PfCustomerStore>();
                    stores.Add(curStore);

                    dataGridViewPagingSumCtrl.BindingDataSource(stores);
                    //if (this.CurItem.Colors != null)
                    //{
                    //    this.textBoxColor.Text = this.CurItem.Colors;
                    //}

                    this.colorComboBox1.SelectedValue = CommonGlobalCache.GetColorIDByName(curStore.ColorName);
                    //this.textBoxColor.Enabled = false;
                }
                else
                {
                    ResetAll();
                }
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
        }
Exemple #5
0
        public RefundDirectCtrl(RetailOrder order)
        {
            InitializeComponent();
            Init();
            this.order = order;

            if (!HasPermission(RolePermissionMenuEnum.销售退货单查询, RolePermissionEnum.重做_单据时间))
            {
                dateTimePicker_Start.Enabled = false;
            }

            List <RetailDetail> details = CommonGlobalCache.ServerProxy.GetRetailDetailList(order.ID);

            if (!String.IsNullOrEmpty(order.MemeberID))
            {
                memberIDTextBox2.Text = order.MemeberID;
                memberIDTextBox2.Search();
            }
            //guideComboBox2.SelectedValue = order.GuideID;
            guideComboBox1.SelectedValue = order.OperateGuideID;
            dateTimePicker_Start.Value   = order.CreateTime;
            string       selectShopid = ValidateUtil.CheckEmptyValue(order.ShopID);
            List <Guide> guideList    = CommonGlobalCache.GuideList.FindAll(t => t.State == 0 && t.ShopID == selectShopid);



            if (details != null)
            {
                foreach (var item in details)
                {
                    this.GuideName.DataSource    = guideList;
                    this.GuideName.DisplayMember = "Name";
                    this.GuideName.ValueMember   = "ID";
                    item.CostumeName             = CommonGlobalCache.GetCostumeName(item.CostumeID);
                    item.SizeDisplayName         = CommonGlobalUtil.GetCostumeSizeName(item.CostumeID, item.SizeName);
                    item.BuyCount            = -item.BuyCount;
                    item.SumMoney            = -item.SumMoney;
                    item.IsRefund            = true;
                    item.RefundCount         = item.BuyCount;
                    item.SumMoneyActual      = -item.SumMoneyActual;
                    item.IsUseTickets        = false;
                    item.Discount            = 100;
                    item.DiscountOrigin      = 100;
                    item.AllowReviseDiscount = true;
                    item.CostPrice           = -item.CostPrice;
                    item.SumCost             = -item.SumCost;
                    item.GuideID             = item.GuideID;
                }
            }
            retailDetailList = details;
            dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(retailDetailList));
        }
Exemple #6
0
 private void BindingSource(List <ReplenishDetail> list)
 {
     this.dataGridView2.DataSource = null;
     if (list != null && list.Count > 0)
     {
         foreach (ReplenishDetail detail in list)
         {
             detail.CostumeName = GlobalCache.GetCostumeName(detail.CostumeID);
         }
         dataGridViewPagingSumCtrl2.BindingDataSource <ReplenishDetail>(list);
         // this.dataGridView2.DataSource = list;
     }
 }
        public void Search()
        {
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                InteractResult <List <CheckStoreOrder> > result = CommonGlobalCache.ServerProxy.GetCheckStoreOrders4Summary(ids, costumeID);
                List <CheckStoreOrder> orders = null;
                switch (result.ExeResult)
                {
                case ExeResult.Success:
                    orders = result.Data;
                    break;

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

                default:
                    break;
                }
                dataGridViewPagingSumCtrl.BindingDataSource(orders);
            }
            catch (Exception ex) { CommonGlobalUtil.ShowError(ex); }
            finally
            {
                UnLockPage();
            }
        }
        private void BaseButtonQuery_Click(object sender, EventArgs e)
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }

                Core.InteractEntity.GetAdminUsersPara para = new Core.InteractEntity.GetAdminUsersPara()
                {
                    IDOrName = skinTextBox_ID.Text
                };
                InteractResult <List <AdminUser> > result = GlobalCache.ServerProxy.GetAdminUsers(para);
                dataGridViewPagingSumCtrl.BindingDataSource(result?.Data);
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                UnLockPage();
            }
        }
Exemple #9
0
        /// <summary>
        /// 绑定要补货的集合源
        /// </summary>
        private void BindingInboundDetailSource()
        {
            if (this.curDetailList != null && this.curDetailList.Count > 0)
            {
                foreach (BoundDetail detail in this.curDetailList)
                {
                    detail.CostumeName = CommonGlobalCache.GetCostumeName(detail.CostumeID);
                    Costume cItem = CommonGlobalCache.GetCostume(detail.CostumeID);
                    detail.Year   = cItem.Year;
                    detail.Season = cItem.Season;
                    if (detail.Comment == null)
                    {
                        detail.Comment = "";
                    }
                }


                /*    CostumeStore destShopStore = item?.CostumeStoreList?.Find(t => t.CostumeID == store.CostumeID && t.ColorName == store.ColorName );
                 *  if (destShopStore != null)
                 *  {
                 *      //取收货方的吊牌价售价
                 *      store.Price = destShopStore.Price;
                 *      store.SalePrice = destShopStore.SalePrice;
                 *  }
                 */
                //  this.dataGridView2.DataSource = this.curDetailList;
            }


            dataGridViewPagingSumCtrl2.BindingDataSource <BoundDetail>(DataGridViewUtil.ListToBindingList(this.curDetailList));
            dataGridViewPagingSumCtrl2.ScrollToEnd();
        }
Exemple #10
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);
        }
Exemple #11
0
 private void dataGridView1_SelectionChanged(object sender, EventArgs e)
 {
     try
     {
         if (flag == false)
         {
             if (this.dataGridView1.CurrentRow.DataBoundItem != null && this.dataGridView1.Rows.Count > 0)
             {
                 ReplenishOrder order = (ReplenishOrder)this.dataGridView1.CurrentRow.DataBoundItem;
                 if (order != null && order != curOrder)
                 {
                     List <ReplenishDetail> curInboundDetailList = GlobalCache.ServerProxy.GetReplenishDetail(order.ID);
                     if (curInboundDetailList != null && curInboundDetailList.Count > 0)
                     {
                         foreach (var item in curInboundDetailList)
                         {
                             Costume costume = CommonGlobalCache.GetCostume(item.CostumeID);
                             item.CostumeName = costume.Name;
                         }
                     }
                     dataGridViewPagingSumCtrl1.BindingDataSource(curInboundDetailList);
                     curOrder = order;
                 }
             }
         }
         else
         {
             flag = false;
         }
     }
     catch (Exception ex)
     {
         // CommonGlobalUtil.ShowError(ex);
     }
 }
Exemple #12
0
        private void Search()
        {
            try
            {
                if (GlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                List <GiftTicketTemplate> list = GlobalCache.ServerProxy.GetGiftTicketTemplates();

                foreach (var item in list)
                {
                    item.OperatorUserName = GlobalCache.GetUserName(item.OperatorUserID);
                }
                dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(list));
            }
            catch (Exception ex)
            {
                GlobalUtil.ShowError(ex);
            }
            finally
            {
                GlobalUtil.UnLockPage(this);
            }
        }
        /// <summary>
        /// 绑定MonthTask数据源
        /// </summary>
        private void BindingMonthTaskDataSource(
            List <MonthTaskSearch> listPage)
        {
            skinSplitContainer1.Panel2Collapsed = true;
            monthGuideTaskSearchList            = listPage;

            dataGridViewPagingSumCtrl.BindingDataSource(listPage);

            //判断现在月份,如果小于当前月份则不允许修改

            int month = DateTime.Now.Month;

            foreach (DataGridViewColumn col in dataGridView_MonthTask.Columns)
            {
                if (shopDataGridViewTextBoxColumn != col && dataGridViewPagingSumCtrl.AutoIndexColumn != col)
                {
                    //增加了序号+1
                    col.ReadOnly = col.Index < month && Decimal.ToInt32(numericUpDown_year.Value) <= DateTime.Now.Year;
                    // col.ReadOnly = col.Index < month  && Decimal.ToInt32(numericUpDown_year.Value) <= DateTime.Now.Year;
                    if (HasPermission(RolePermissionEnum.编辑))
                    {
                        if (col.ReadOnly)
                        {
                            col.DefaultCellStyle.ForeColor = Color.DarkGray;
                        }
                        else
                        {
                            col.DefaultCellStyle.ForeColor = Color.Black;
                        }
                    }
                }
            }
        }
 private void dataGridView1_SelectionChanged(object sender, EventArgs e)
 {
     try
     {
         PfOrder order = (PfOrder)this.dataGridView1.CurrentRow.DataBoundItem;
         if (order != null && order != curOrder)
         {
             List <PfOrderDetail> curInboundDetailList = CommonGlobalCache.ServerProxy.GetPfOrderDetails(order.ID);
             if (curInboundDetailList != null)
             {
                 foreach (var item in curInboundDetailList)
                 {
                     Costume costume = CommonGlobalCache.GetCostume(item.CostumeID);
                     item.BrandName   = CommonGlobalCache.GetBrandName(costume.BrandID);
                     item.CostumeName = costume.Name;
                 }
             }
             dataGridViewPagingSumCtrl1.BindingDataSource(curInboundDetailList);
             curOrder = order;
         }
     }
     catch (Exception ex)
     {
         //  CommonGlobalUtil.ShowError(ex);
     }
 }
Exemple #15
0
        private void Search(CostumeInvoicingDetailPfType type)
        {
            try
            {
                if (CommonGlobalUtil.EngineUnconnectioned(this))
                {
                    return;
                }
                InteractResult <List <PfOrder> > listPage2 = CommonGlobalCache.ServerProxy.GetCostumeInvoicingDetail4Pf(para, type);

                /*   if (!String.IsNullOrEmpty(orderId))
                 * {
                 *     InteractResult<PfAccountRecord> result = GlobalCache.ServerProxy.GetPfAccountRecord(orderId  ,para.Type);
                 *     List<PfAccountRecord> listPage = new List<PfAccountRecord>();
                 *     listPage.Add(result.Data);
                 *     this.dataGridViewPagingSumCtrl.BindingDataSource(listPage);
                 * }
                 * else
                 * {
                 *     InteractResult<List<PfAccountRecord>> listPage = GlobalCache.ServerProxy.GetPfAccountRecord4Summary(para);
                 *     this.dataGridViewPagingSumCtrl.BindingDataSource(listPage.Data);
                 * }*/
                dataGridViewPagingSumCtrl.BindingDataSource(listPage2.Data);
            }
            catch (Exception ee)
            {
                ShowError(ee);
            }
            finally
            {
                UnLockPage();
            }
        }
Exemple #16
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();
     }
 }
        private void baseButton1_Click(object sender, EventArgs e)
        {
            string name = textBox1.Text.ToString();
            //if (name != "")
            //{
            GetDistributorsPara para = new GetDistributorsPara()
            {
                //StartTime=
                DistributorIDOrName = "",
                PageIndex           = 0,
                PageSize            = 20,
                StartTime           = new CJBasic.Date(this.dateTimePicker_Start.Value),
                EndTime             = new CJBasic.Date(this.dateTimePicker_End.Value),
            };
            InteractResult <DistributorCommissionPage> result = GlobalCache.ServerProxy.GetDistributors4Retail(para);

            if (result.ExeResult == ExeResult.Success)
            {
                if (result.Data != null)
                {
                    dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(result.Data.Distributors));
                }
            }
            else
            {
                ShowMessage(result.Msg);
            }

            //}
        }
Exemple #18
0
        private void skinComboBoxShopID_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (dataGridView1.Rows.Count > 0 && isFlag == false)
            {
                DialogResult dialogResult = GlobalMessageBox.Show("切换店铺将会清空列表,是否确定切换?", "提示", MessageBoxButtons.OKCancel);
                if (dialogResult != DialogResult.OK)
                {
                    isFlag = true;
                    this.skinComboBoxShopID.SelectedValue = ISCancelShopId;
                    return;
                }

                currentRetailCostume.RetailDetailList.Clear();

                dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(currentRetailCostume.RetailDetailList));
                // SetCostumeDetails(null);
            }
            else
            {
                isFlag = false;
            }
            //skinComboBoxShopID
            shopID = ValidateUtil.CheckEmptyValue(this.skinComboBoxShopID.SelectedValue);

            ISCancelShopId = shopID;
            guideComboBox1.Initialize(Common.GuideComboBoxInitializeType.Null, shopID);
            retailOrderIDTextBox1.ShopID      = shopID;
            CostumeCurrentShopTextBox1.ShopID = shopID;
        }
Exemple #19
0
        private void BindingReturnOrderSource(RetailSummary listPage)
        {
            // this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.RetailSummaryInfos);

            dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(listPage?.RetailSummaryInfos));
            this.skinSplitContainer1.Panel2Collapsed = true;
        }
        public WholesaleDeliveryPickForm(bool isPurchase)
        {
            InitializeComponent();
            MenuPermission            = RolePermissionMenuEnum.批发发货;
            dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(this.dataGridView1);
            dataGridViewPagingSumCtrl.Initialize();
            dataGridViewPagingSumCtrl.ShowRowCounts = false;
            dataGridViewPagingSumCtrl1 = new DataGridViewPagingSumCtrl(this.dataGridView2);
            dataGridViewPagingSumCtrl1.Initialize();
            dataGridViewPagingSumCtrl1.ShowRowCounts = false;

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

            orders = GlobalCache.ServerProxy.GetHangUpPfs(para);
            if (orders != null)
            {
                foreach (var item in orders)
                {
                    item.PfCustomerName = PfCustomerCache.GetPfCustomerName(item.PfCustomerID);
                    item.AdminUserName  = CommonGlobalCache.GetUserName(item.AdminUserID);
                }
            }
            dataGridViewPagingSumCtrl.BindingDataSource(orders);
        }
 public void Search()
 {
     try
     {
         if (CommonGlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         InteractResult <List <DistributorCommissionRecord> > listPage = CommonGlobalCache.ServerProxy.GetCommissionRecords4Pf(para);
         dataGridViewPagingSumCtrl.BindingDataSource(listPage.Data);
     }
     catch (Exception ex) { CommonGlobalUtil.ShowError(ex); }
     //finally
     //{
     //    UnLockPage();
     //}
 }
Exemple #22
0
 /// <summary>
 /// 绑定MemberList源到dataGridView 中
 /// </summary>
 /// <param name="memberListPage"></param>
 private void BindingMemberDateSource(MemberListPage listPage)
 {
     if (listPage != null && listPage.MemberArray != null && listPage.MemberArray.Count > 0)
     {
         this.SetMemberOtherValue(listPage.MemberArray);
     }
     dataGridViewPagingSumCtrl.BindingDataSource(listPage?.MemberArray, null, listPage?.TotalEntityCount, listPage?.MemberSum);
 }
Exemple #23
0
        private void baseButton1_Click(object sender, EventArgs e)
        {
            string idName            = this.skinTextBoxName.SkinTxt.Text;
            List <CostumeColor> list = GlobalCache.ServerProxy.GetCostumeColor4IDOrName(idName);

            dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(list));
            dataGridView1.Refresh();
        }
Exemple #24
0
 private void BindingDataSource()
 {
     if (this.rechargeRecordList != null && this.rechargeRecordList.Count > 0)
     {
         this.SetGuideName();//绑定源前先将GuideName字段赋值,用于显示
     }
     dataGridViewPagingSumCtrl.BindingDataSource <RechargeRecord>(DataGridViewUtil.ListToBindingList(this.rechargeRecordList));
 }
Exemple #25
0
 private void BindingDataSources(SalesAnalysisDeatilInfo listPage)
 {
     dataGridViewPagingSumCtrl.BindingDataSource(listPage.SalesAnalysisDeatils);
     dataGridViewPagingSumCtrl.AppendNotShowInColumnSettings(
         DataGridViewTextBoxColumnF, DataGridViewTextBoxColumnXS, DataGridViewTextBoxColumnS,
         DataGridViewTextBoxColumnM, DataGridViewTextBoxColumnL, DataGridViewTextBoxColumnXL, DataGridViewTextBoxColumnXL2, DataGridViewTextBoxColumnXL3,
         DataGridViewTextBoxColumnXL4, DataGridViewTextBoxColumnXL5, DataGridViewTextBoxColumnXL6);
 }
Exemple #26
0
 public void Search(CostumeInvoicingDetailInType type)
 {
     try
     {
         if (CommonGlobalUtil.EngineUnconnectioned(this))
         {
             return;
         }
         InteractResult <List <PurchaseOrder> > listPage = CommonGlobalCache.ServerProxy.GetCostumeInvoicingDetail4In(para, type);
         dataGridViewPagingSumCtrl.BindingDataSource(listPage.Data);
     }
     catch (Exception ex) { CommonGlobalUtil.ShowError(ex); }
     //finally
     //{
     //    UnLockPage();
     //}
 }
Exemple #27
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();
            }
        }
        private void BindingDataSource(CostumeListPage listPage)
        {
            this.SetOtherValue(listPage.CostumeList);
            this.queryResults = listPage.CostumeList;

            dataGridViewPagingSumCtrl.BindingDataSource(listPage?.CostumeList, null, listPage?.TotalEntityCount);
            //      this.dataGridViewQueryResults.DataSource = listPage.CostumeList;
            //  this.dataGridViewQueryResults.Refresh();
        }
Exemple #29
0
 private void BindingSource(List <BoundDetail> list)
 {
     this.dataGridView2.DataSource = null;
     if (list != null && list.Count > 0)
     {
         foreach (var item in list)
         {
             Costume costume = CommonGlobalCache.GetCostume(item.CostumeID);
             item.SupplierName = CommonGlobalCache.GetSupplierName(item.SupplierID);
             item.BrandName    = CommonGlobalCache.GetBrandName(costume.BrandID);
             item.Year         = costume.Year;
             item.Season       = costume.Season;
             item.CostumeName  = costume.Name;
         }
         dataGridViewPagingSumCtrl2.BindingDataSource <BoundDetail>(DataGridViewUtil.ListToBindingList(curDetailList));
         //this.dataGridView2.DataSource = list;
     }
 }
Exemple #30
0
        private void LoadRoles()
        {
            InteractResult <List <Role> > result = GlobalCache.ServerProxy.GetRoles();

            switch (result.ExeResult)
            {
            case ExeResult.Success:
                dataGridViewPagingSumCtrl.BindingDataSource(DataGridViewUtil.ListToBindingList(result.Data));
                break;

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

            default:
                break;
            }
        }