private CheckStoreDetail ToCheckStoreDetail(CostumeStoreHistory item) { CheckStoreDetail detail = new CheckStoreDetail(); if (item != null) { Costume costume = CommonGlobalCache.GetCostume(item.CostumeID); if (costume != null) { ReflectionHelper.CopyProperty(costume, detail); detail.CostumeID = costume.ID; detail.CostumeName = costume.Name; detail.ColorName = item.ColorName; detail.BrandName = CommonGlobalCache.GetBrandName4CostumeID(detail.CostumeID); detail.FAtm = item.F; detail.SAtm = item.S; detail.MAtm = item.M; detail.LAtm = item.L; detail.XSAtm = item.XS; detail.XLAtm = item.XL; detail.XL2Atm = item.XL2; detail.XL3Atm = item.XL3; detail.XL4Atm = item.XL4; detail.XL5Atm = item.XL5; detail.XL6Atm = item.XL6; } else { // ShowErrorMessage("款号不存在:" + item.CostumeID); } } return(detail); }
private void ToCheckStoreDetail(CheckStoreDetail detail, CostumeStoreHistory item) { if (item != null) { Costume costume = CommonGlobalCache.GetCostume(item.CostumeID); if (costume != null) { detail.CostumeID = item.CostumeID; detail.CostumeName = costume.Name; detail.ColorName = item.ColorName; detail.Price = costume.Price; detail.FAtm = item.F; detail.SAtm = item.S; detail.MAtm = item.M; detail.LAtm = item.L; detail.XSAtm = item.XS; detail.XLAtm = item.XL; detail.XL2Atm = item.XL2; detail.XL3Atm = item.XL3; detail.XL4Atm = item.XL4; detail.XL5Atm = item.XL5; detail.XL6Atm = item.XL6; } else { // ShowErrorMessage("款号不存在:" + item.CostumeID); } } }
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(); }
private void LoadOrder(PfOrder order) { if (order != null) { //冲单重做 skinComboBox_PfCustomer.SelectedValue = order.PfCustomerID; dateTimePicker_Start.Value = order.CreateTime; numericTextBoxMoney.Value = order.PayMoney; SetPayType(order.PayType); skinComboBoxShopID.SelectedValue = order.ShopID; curInboundDetailList = GlobalCache.ServerProxy.GetPfOrderDetails(order.ID); if (curInboundDetailList != null) { foreach (var item in curInboundDetailList) { Costume costume = CommonGlobalCache.GetCostume(item.CostumeID); item.CostumeName = costume.Name; item.CustomerID = order.PfCustomerID; item.BrandName = CommonGlobalCache.GetBrandName(costume.BrandID); item.CustomerName = PfCustomerCache.GetPfCustomerName(item.CustomerID); } } skinTextBox_Remarks.Text = order.Remarks; } this.BindingInboundDetailSource(); }
/// <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(); } }
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 { } }
/// <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(); }
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); }
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(); } }
private void SetGuideName() { foreach (RechargeRecord record in this.rechargeRecordList) { record.GuideName = CommonGlobalCache.GetUserName(record.GuideID); } }
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); }
private void Remove(List <PfCustomer> list, PfCustomer item) { InteractResult result = PfCustomerCache.PfCustomer_OnRemove(item.ID); switch (result.ExeResult) { case ExeResult.Success: TreeModel treeM = new TreeModel(); treeM.ID = item.ID; treeM.Name = item.Name; CommonGlobalCache.DeletePFDistributor(treeM); GlobalMessageBox.Show("删除成功!"); this.dataGridView1.DataSource = null; list.Remove(item); this.dataGridView1.DataSource = list; break; case ExeResult.Error: GlobalMessageBox.Show(result.Msg); break; default: break; } }
private void Initialize() { if (this.curReplenishOrder == null) { return; } try { DataGridViewUtil.SetAlternatingColor(dataGridView1, Color.Gainsboro, Color.White); this.skinTextBox_OrderID.Text = "补货申请单号:" + this.curReplenishOrder.ID; this.skinLabel_ShopName.Text = "店铺名称:" + GlobalCache.GetShopName(this.curReplenishOrder.ShopID); curReplenishDetailList = GlobalCache.ServerProxy.GetReplenishDetail(this.curReplenishOrder.ID); foreach (var item in curReplenishDetailList) { Costume costume = CommonGlobalCache.GetCostume(item.CostumeID); if (costume != null) { item.CostPrice = costume.CostPrice; } } this.BindingSource(curReplenishDetailList); } catch (Exception ex) { GlobalUtil.ShowError(ex); } }
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); } }
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(); } }
/// <summary> /// 绑定RetailDetail数据源并设置下方的Label值 /// </summary> private void BindingRetailDetailDataSourceAndCleanLabel(RetailOrder retailOrder) { this.skinSplitContainer1.Panel2Collapsed = false; if (retailOrder == null || String.IsNullOrEmpty(retailOrder.ID)) { this.dataGridView_RetailDetail.DataSource = null; } else { List <RetailDetail> retailDetailList = CommonGlobalCache.ServerProxy.GetRetailDetailList(retailOrder.ID); this.dataGridView_RetailDetail.DataSource = null; 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); // detail.SinglePrice = detail.SumMoney / detail.BuyCount*-1; // detail.BrandName =CommonGlobalCache.GetBrandName4CostumeID(detail.CostumeID); } this.dataGridView_RetailDetail.DataSource = DataGridViewUtil.ListToBindingList(retailDetailList); } } this.dataGridView_RetailDetail.Refresh(); this.SetRetailOrderLabel(retailOrder); }
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; } } } }
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); } }
/// <summary> /// 绑定CostumeStore数据源 /// </summary> /// <param name="listPage"></param> private void BindingCostumeStoreDataSource(PfCustomerStorePage listPage) { this.dataGridView1.DataSource = null; this.costumeStoreList.Clear(); if (listPage != null && listPage.PfCustomerStores != null) { foreach (PfCustomerStore store in listPage.PfCustomerStores) { Costume costume = CommonGlobalCache.GetCostume(store.CostumeID); if (costume != null) { store.PfCustomerName = PfCustomerCache.GetPfCustomerName(store.PfCustomerID); store.CostumeName = costume.Name; store.Remarks = costume.Remarks; } this.costumeStoreList.Add(store); } if (this.costumeStoreList != null && this.costumeStoreList.Count > 0) { this.dataGridViewPagingSumCtrl.BindingDataSource <PfCustomerStore>(DataGridViewUtil.ToDataTable <PfCustomerStore>(costumeStoreList)); } } this.dataGridView1.Refresh(); }
private void SetDataSource(List <Costume> items) { //this.currentSource = items; this.currentSource.Clear(); for (int i = 0; i < items.Count; i++) { items[i].BrandName = CommonGlobalCache.GetBrandName(items[i].BrandID); //items[i].Costume.SupplierName = CommonGlobalCache.GetSupplierName(items[i].Costume.SupplierID); //if (items[i].CostumeStoreList != null) //{ // foreach (var item in items[i].CostumeStoreList) // { // item.CostumeName = items[i].Costume.Name; // item.BrandName = items[i].Costume.BrandName; // item.Price = items[i].Costume.Price; // item.CostPrice = items[i].Costume.CostPrice; // } //} this.currentSource.Add(items[i]); } this.dataGridView1.DataSource = null; this.dataGridView1.DataSource = this.currentSource; }
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); } }
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); } }
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); } }
private void BindingRetailDetailDataSourceAndCleanLabel(PfCustomerRetailOrder retailOrder) { this.skinSplitContainer1.Panel2Collapsed = false; // this.skinSplitContainer1.Panel2Collapsed = true; if (retailOrder == null || String.IsNullOrEmpty(retailOrder.ID)) { this.dataGridView_RetailDetail.DataSource = null; } else { List <PfCustomerRetailDetail> retailDetailList = GlobalCache.ServerProxy.GetPfCustomerRetailDetails(retailOrder.ID); this.dataGridView_RetailDetail.DataSource = null; if (retailDetailList != null && retailDetailList.Count > 0) { foreach (PfCustomerRetailDetail detail in retailDetailList) { detail.CostumeName = CommonGlobalCache.GetCostumeName(detail.CostumeID); detail.SizeDisplayName = CommonGlobalUtil.GetCostumeSizeName(detail.CostumeID, detail.SizeName); } this.dataGridView_RetailDetail.DataSource = retailDetailList; //this.dataGridView_RetailDetail.BindSource4Reports<RetailDetail>(retailDetailList,new string[] { buyCountDataGridViewTextBoxColumn.DataPropertyName, sumMoneyDataGridViewTextBoxColumn.DataPropertyName } ); // this.skinSplitContainer1.Panel2Collapsed = false; } } this.dataGridView_RetailDetail.Refresh(); }
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; }
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 ShowImage() { if (dataGridView1.CurrentRow != null) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } SalesQuantityRanking item = (SalesQuantityRanking)dataGridView1.CurrentRow.DataBoundItem; if (skinCheckBoxShowImage.Checked) { if (imageCtrl != null) { imageCtrl?.Close(); imageCtrl = null; } imageCtrl = new SingleImageForm(); imageCtrl.FormClosing += ImageCtrl_FormClosing; imageCtrl.Text = "款号:" + item.CostumeID; skinCheckBoxShowImage.CheckedChanged -= skinCheckBoxShowImage_CheckedChanged; skinCheckBoxShowImage.Checked = true; skinCheckBoxShowImage.CheckedChanged += skinCheckBoxShowImage_CheckedChanged; imageCtrl.OnLoadingState(); Costume Curitem = CommonGlobalCache.GetCostume(item.CostumeID); // byte[] bytes = CommonGlobalCache.ServerProxy.GetCostumePhoto(item.CostumeID); if (Curitem.EmThumbnail != null) { // imageCtrl.Image = CCWin.SkinControl.ImageHelper.Convert(bytes); System.Net.WebRequest webreq = System.Net.WebRequest.Create(Curitem.EmThumbnail); System.Net.WebResponse webres = webreq.GetResponse(); using (System.IO.Stream stream = webres.GetResponseStream()) { imageCtrl.Image = Image.FromStream(stream); } } else { imageCtrl.Image = null; } imageCtrl?.BringToFront(); imageCtrl?.Show(); } } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } } }
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 { } }
/// <summary> /// 将集合中GuideName赋值 /// </summary> /// <param name="memberList"></param> private void SetOtherValue(List <Costume> list) { foreach (Costume item in list) { String name = CommonGlobalCache.GetSupplierName(item.SupplierID); item.SupplierName = name; item.BrandName = CommonGlobalCache.GetBrandName(item.BrandID); } }
/// <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; } }