/// <summary> /// 绑定plenishOrderSource源到dataGridView中 /// </summary> /// <param name="listPage"></param> private void BindingReturnOrderSource(ReturnOrderPage listPage) { // this.dataGridViewPagingSumCtrl.SetDataSource<PurchaseOrder>(null); if (listPage != null && listPage.ReturnOrderList != null && listPage.ReturnOrderList.Count > 0) { List <PurchaseOrder> details = listPage.ReturnOrderList; foreach (var item in details) { if (item.AdminUserID != null) { try { item.UserName = GlobalCache.GetUserName(item.AdminUserID); } catch (Exception ex) { item.UserName = ""; } } if (item.SupplierID != null) { item.SupplierName = GlobalCache.GetSupplierName(item.SupplierID); } item.DestShopName = GlobalCache.GetShopName(item.DestShopID); } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.ReturnOrderList, null, listPage?.TotalEntityCount, listPage?.ReturnOrderSum); this.skinSplitContainer1.Panel2Collapsed = true; }
private void BindingDataSource(CarriageCostTemplatePage listPage) { if (listPage != null && listPage.CarriageCostTemplates != null) { foreach (var item in listPage.CarriageCostTemplates) { item.LastOperatorUserName = GlobalCache.GetUserName(item.LastOperatorUserID); } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.CarriageCostTemplates, null, listPage?.TotalEntityCount); }
private void BindingSource(SupplierAccountRecordPage listPage) { if (listPage != null && listPage.SupplierAccountRecords != null && listPage.SupplierAccountRecords.Count > 0) { foreach (var item in listPage.SupplierAccountRecords) { item.SupplierName = GlobalCache.GetSupplierName(item.SupplierID); item.AdminUserName = GlobalCache.GetUserName(item.AdminUserID); item.AccountTypeName = GlobalUtil.GetAccountTypeName(item.AccountType); } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage.SupplierAccountRecords, null, listPage?.TotalEntityCount, listPage?.Sum); }
/// <summary> /// 绑定plenishOrderSource源到dataGridView中 /// </summary> /// <param name="listPage"></param> private void BindingPurchaseOrderSource(PurchaseCostumePage listPage) { if (listPage != null && listPage.PurchaseOrderList != null && listPage.PurchaseOrderList.Count > 0) { List <PurchaseOrder> details = listPage.PurchaseOrderList; foreach (var item in details) { if (!String.IsNullOrEmpty(item.DestShopID)) { item.ShopName = GlobalCache.GetShopName(item.DestShopID); item.UserName = GlobalCache.GetUserName(item.AdminUserID); } } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.PurchaseOrderList, null, listPage?.TotalEntityCount, listPage?.PurchaseOrderSum); this.skinSplitContainer1.Panel2Collapsed = true; }
/// <summary> /// 绑定RefundOrder数据源 /// </summary> private void BindingRefundOrderDataSource(RefundListPage listPage) { if (listPage != null) { this.refundOrderList = listPage.ResultList; if (this.refundOrderList != null && this.refundOrderList.Count > 0) { foreach (RetailOrder refundOrder in this.refundOrderList) { refundOrder.GuideName = GlobalCache.GetUserName(refundOrder.GuideID); refundOrder.ShopName = GlobalCache.GetShopName(refundOrder.ShopID); } } } this.dataGridViewPagingSumCtrl.BindingDataSource(listPage?.ResultList, null, listPage?.TotalEntityCount, listPage?.RetailOrderSum); this.dataGridView_RefundOrder.Refresh(); this.dataGridView_RefundDetail.Visible = false; }
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.RowIndex < -1 || e.ColumnIndex < -1) { return; } if (e.Value == null) { return; } DataGridView view = sender as DataGridView; ScrapOrder order = view.Rows[e.RowIndex].DataBoundItem as ScrapOrder; if (e.ColumnIndex == ShopNameColumn.Index) { e.Value = GlobalCache.GetShopName(e.Value.ToString()); } else if (e.ColumnIndex == AdminUserColumn.Index) { e.Value = GlobalCache.GetUserName(e.Value.ToString()); } else if (e.ColumnIndex == ColumnCancel.Index) { if (order.IsCancel) { e.Value = null; } } else if (e.ColumnIndex == ColumnRedo.Index) { if (!order.IsCancel) { e.Value = null; } } }
private void RetailOrderIDTextBox1_OrderSelected(RetailOrder retailOrder) { try { if (retailOrder == null) { return; } this.retailOrderIDTextBox1.SkinTxt.Text = retailOrder.ID; if (GlobalUtil.EngineUnconnectioned(this)) { return; } this.originalRetailCostume = GlobalCache.ServerProxy.GetOneRetailCostume(retailOrder.ID); if (this.originalRetailCostume == null) { return; } this.currentRetailCostume = this.originalRetailCostume; RetailOrder order = this.currentRetailCostume.RetailOrder; foreach (RetailDetail detail in this.currentRetailCostume.RetailDetailList) { detail.IsRefund = true; detail.RefundCount = detail.BuyCount; } #region 设置标签信息 Member member = GlobalCache.ServerProxy.GetOneMember(order.MemeberID); if (member != null) { this.skinLabel_MemberName.Text = member.Name; } else { this.skinLabel_MemberName.Text = ""; } this.skinLabel_MemberID.Text = order.MemeberID; this.skinLabel_GuideID.Text = GlobalCache.GetUserName(order.GuideID); // SalesPromotion salesPromotion = GlobalCache.ServerProxy.GetOneSalesPromotion(order.SalesPromotionID); // if (salesPromotion != null) // { // this.skinLabel_SalesPromotion.Text = salesPromotion.Name; // } // else // { // this.skinLabel_SalesPromotion.Text = ""; // } this.skinLabel_SalesPromotion.Text = order.PromotionText; this.skinLabel_MoneyIntegration.Text = order.MoneyIntegration.ToString(); this.skinLabel_MoneyStoredCard.Text = order.MoneyVipCard.ToString(); this.skinLabel_TotalMoneyReceived.Text = order.TotalMoneyReceived.ToString(); skinLabel_SmallMoneyRemoved.Text = retailOrder.SmallMoneyRemoved.ToString(); this.skinLabel_MoneyCash.Text = retailOrder.MoneyCash.ToString(); this.skinLabel_MoneyStoredCard.Text = retailOrder.MoneyVipCard.ToString(); this.skinLabel_MoneyBankCard.Text = retailOrder.MoneyBankCard.ToString(); this.skinLabel_MoneyWeiXin.Text = retailOrder.MoneyWeiXin.ToString(); this.skinLabel_MoneyAlipay.Text = retailOrder.MoneyAlipay.ToString(); this.skinLabelOther.Text = retailOrder.MoneyOther.ToString(); this.skinLabel_MoneyChange.Text = retailOrder.MoneyChange.ToString(); this.skinLabelGiftTicket.Text = retailOrder.MoneyDeductedByTicket.ToString(); skinLabel_remark.Text = retailOrder.Remarks; #endregion #region 绑定数据源 this.BindingRetailCostumeSource(); #endregion } catch (Exception ee) { GlobalUtil.WriteLog(ee); GlobalMessageBox.Show("查询失败!"); } finally { GlobalUtil.UnLockPage(this); } }