private void ShowReturnSuccess(EmRetailOrder item) { EmOrderSellerForm form = new EmOrderSellerForm(item); form.ShowDialog(); }
private void ShowWaitSeller(EmRetailOrder item) { EmOrderSellerForm form = new EmOrderSellerForm(item); form.ShowDialog(); }
private void ShowDeliver(EmRetailOrder item) { try { EmOrderDeliverForm2 form = new EmOrderDeliverForm2(item); // form.RefreshPageAction += EmOrderDeliverForm_RefreshPageAction; if (form.ShowDialog(this) == DialogResult.OK) { if (GlobalMessageBox.Show("是否确认操作?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { if (GlobalUtil.EngineUnconnectioned(this)) { return; } para = form.Result; CJBasic.CbGeneric cb = new CJBasic.CbGeneric(this.GetInfo); cb.BeginInvoke(null, null); } } } catch (Exception ex) { GlobalUtil.ShowError(ex); } finally { // GlobalUtil.UnLockPage(this); } }
private void SetRetailOrderInfo() { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } EmRetailOrder retailOrder = GlobalCache.EMallServerProxy.GetOneEmRetailOrder(this.Order.EmRetailOrderID); skinLabelDiscountAmount.Text = retailOrder.MoneyDeductedByTicket.ToString(); if (retailOrder.State == 0) { this.skinLabelOrderPayTime.Text = String.Empty; } else { this.skinLabelOrderPayTime.Text = retailOrder.TimePay.ToString(DateTimeUtil.DEFAULT_DATETIME_FORMAT); } this.skinLabelSalePrice.Text = retailOrder.TotalEmOnlinePrice.ToString(); //(retailOrder.TotalMoneyReceived - retailOrder.CarriageCost).ToString(); // this.skinLabelCarriage.Text = retailOrder.CarriageCost.ToString(); this.skinLabelOrderPayAmount.Text = retailOrder.TotalMoneyReceived.ToString(); } catch (Exception ex) { GlobalUtil.ShowError(ex); } finally { GlobalUtil.UnLockPage(this); } }
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e) { if (e.RowIndex < 0 || e.ColumnIndex < 0) { return; } DataGridView view = sender as DataGridView; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; EmRetailOrder order = (EmRetailOrder)row.DataBoundItem; if (orderStateDataGridViewTextBoxColumn.Index == e.ColumnIndex) { if (order.IsClosed) { e.Value = "已关闭"; } } else if (Column1.Index == e.ColumnIndex) { // e.Value = "待商家处理"; if (order.OrderStateName == EmRetailOrder.GetOrderState(EmRetailOrderState.WaitPay)) { //待付款 e.Value = String.Empty; } else if (order.OrderStateName == EmRetailOrder.GetOrderState(EmRetailOrderState.WaitDelivery)) { //待发货 e.Value = "发货"; } else if (order.OrderStateName == EmRetailOrder.GetOrderState(EmRetailOrderState.WaitSign)) { //待收货=已发货 e.Value = "查看物流"; } if (order.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.RefundApplication) || order.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.Refunding)) { // 判断订单处于:“0:退款申请中”、“3:退款中”,则这些订单的操作是:【待商家处理】。 e.Value = "待商家处理"; } else if (order.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.Refused) || order.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.WriteExpress)) { // 判断订单处于:“0:退款申请中”、“3:退款中”,则这些订单的操作是:【待商家处理】。 e.Value = "待买家处理"; } else if (order.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.Refunded)) { // 判断订单处于:“4:已退款” ,则这些订单的操作是:【退款成功】 e.Value = "退款成功"; } // 待买家处理 } }
private void ShowLogistic(EmRetailOrder item) { EmOrderLogisticsForm form = new EmOrderLogisticsForm(item); //form.RefreshPageAction += EmOrderDeliverForm_RefreshPageAction; form.ShowDialog(); }
private void CostumeForm_CostumeSelected(EmRetailOrder costumeItem) { this.SkinTxt.Text = costumeItem.ID; if (this.EmRetailOrderSelected != null) { this.EmRetailOrderSelected(costumeItem); } }
private void ConfirmSelectCell(EmRetailOrder item) { if (this.EmRetailOrderSelected != null) { this.EmRetailOrderSelected(item); } this.DialogResult = DialogResult.OK; }
public EmOrderDeliverForm2(EmRetailOrder order) { InitializeComponent(); this.Order = order; GlobalUtil.SetShop(skinComboBoxShopID, true); SetLogisticCompany(skinTextBoxLogisticCompany); //加载设置默认物流公司 LoadConfig(); }
private void baseButtonLogistic_Click(object sender, EventArgs e) { //获取退货单信息 EmRetailOrder item = GlobalCache.EMallServerProxy.GetEmRefundOrderLogistics(Order.EmRefundOrderID); EmOrderLogisticsForm form = new EmOrderLogisticsForm(item); //form.RefreshPageAction += EmOrderDeliverForm_RefreshPageAction; form.ShowDialog(); }
private void baseButton4_Click(object sender, EventArgs e) { //确认退款 try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } ConfirmRefundPara para = new ConfirmRefundPara() { EmRefundOrderID = Order.EmRefundOrderID, OperateID = CommonGlobalCache.CurrentUserID, Remarks = string.Empty }; RefundResult result = GlobalCache.EMallServerProxy.ConfirmRefund(para); switch (result) { case RefundResult.Success: GlobalMessageBox.Show("已确认退款!"); Display(EmRetailOrder.GetRefundState(RefundStateEnum.Refunded)); this.DialogResult = DialogResult.OK; break; case RefundResult.StateIsError: GlobalMessageBox.Show("退款申请状态不符合要求!"); break; case RefundResult.IsRefund: GlobalMessageBox.Show("已经退过货!"); break; case RefundResult.MemberIsNotExist: GlobalMessageBox.Show("会员不存在!"); break; case RefundResult.Error: GlobalMessageBox.Show("内部错误!"); break; default: break; } } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
private void dataGridView1_SelectionChanged(object sender, EventArgs e) { try { DataGridView view = (DataGridView)sender; EmRetailOrder item = view.CurrentRow.DataBoundItem as EmRetailOrder; splitContainer1.Panel2Collapsed = false; this.DetailClick?.Invoke(item, this, this.splitContainer1.Panel2); } catch (Exception ex) { // ShowError(ex); } }
private void SetOrderState() { List <ListItem <EmRetailOrderState> > list = new List <ListItem <EmRetailOrderState> >(); list.Add(new ListItem <EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.All), EmRetailOrderState.All)); //list.Add(new ListItem<EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.Closed), OrderState.Closed)); list.Add(new ListItem <EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.WaitPay), EmRetailOrderState.WaitPay)); list.Add(new ListItem <EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.WaitDelivery), EmRetailOrderState.WaitDelivery)); list.Add(new ListItem <EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.WaitSign), EmRetailOrderState.WaitSign)); list.Add(new ListItem <EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.Finish), EmRetailOrderState.Finish)); list.Add(new ListItem <EmRetailOrderState>(EmRetailOrder.GetOrderState(EmRetailOrderState.Closed), EmRetailOrderState.Closed)); skinComboBoxOrderState.DisplayMember = "Key"; skinComboBoxOrderState.ValueMember = "Value"; skinComboBoxOrderState.DataSource = list; }
private void Agree(AgreeRefundPara para) { try { if (GlobalUtil.EngineUnconnectioned(this)) { return; } RefundResult result = GlobalCache.EMallServerProxy.AgreeRefund(para); switch (result) { case RefundResult.Success: GlobalMessageBox.Show("已同意退款!"); Display(EmRetailOrder.GetRefundState(RefundStateEnum.Refunding)); break; case RefundResult.StateIsError: GlobalMessageBox.Show("退款申请状态不符合要求!"); break; case RefundResult.IsRefund: GlobalMessageBox.Show("已经退过货!"); break; case RefundResult.MemberIsNotExist: GlobalMessageBox.Show("会员不存在!"); break; case RefundResult.Error: GlobalMessageBox.Show("内部错误!"); break; default: break; } } catch (Exception ee) { GlobalUtil.ShowError(ee); } finally { GlobalUtil.UnLockPage(this); } }
public EmOrderSellerForm(EmRetailOrder order) { InitializeComponent(); this.Order = order; //根据状态显示 Display(Order.OrderStateName); if (TrackInfo.OnlyRefundMoney) { this.baseButton2.Text = "拒绝退款"; this.baseButton3.Text = "同意退款"; } else { this.baseButton2.Text = "拒绝退货"; this.baseButton3.Text = "同意退货"; } }
public EmOrderDetailCtrl(EmRetailOrder order) { InitializeComponent(); // this.Controls.Add(imageCtrl); dataGridViewPagingSumCtrl = new DataGridViewPagingSumCtrl(this.dataGridView1); dataGridViewPagingSumCtrl.Initialize(); this.Order = order; if (Order != null) { if (this.Order.OrderState == EmRetailOrderState.WaitDelivery || this.Order.OrderState == EmRetailOrderState.WaitPay) { //this.baseButtonOutbound.Visible = false; //// this.skinLabelLogisticCompany.Visible = false; //// this.skinLabelLogisticId.Visible = false; //this.skinTextBoxLogisticCompany.Enabled = false; //this.skinTextBoxLogisticId.Enabled = false; //skinComboBoxShopID.Enabled = false; skinLabelLogisticCompany.Visible = false; skinLabelLogisticId.Visible = false; skinLabel1.Visible = false; skinLabel2.Visible = false; skinLabel3.Visible = false; skinLabel4.Visible = false; } else { skinLabelLogisticCompany.Visible = true; skinLabelLogisticId.Visible = true; skinLabel1.Visible = true; skinLabel2.Visible = true; skinLabel3.Visible = true; skinLabel4.Visible = true; } // SetLogisticCompany(skinTextBoxLogisticCompany); // config = EmExpressCompanyAgileConfiguration.Load(CONFIG_PATH) as EmExpressCompanyAgileConfiguration; // if (config != null) { skinTextBoxLogisticCompany.SelectedItem = config.EmExpressCompany; } Display(); Initialize(); } }
private void baseButton1_Click(object sender, EventArgs e) { try { if (GlobalMessageBox.Show("确认拒绝退款?", "提示", MessageBoxButtons.OKCancel) != DialogResult.OK) { return; } //if (GlobalUtil.EngineUnconnectioned(this)) //{ // return; //} EmOrderRefundReasonForm form = new EmOrderRefundReasonForm(); if (form.ShowDialog() == DialogResult.OK) { String refundReason = form.result; RefusedRefundPara para = new RefusedRefundPara() { EmRefundOrderID = Order.EmRefundOrderID, OperateID = CommonGlobalCache.CurrentUserID, RejectCauese = refundReason }; RefundResult result = GlobalCache.EMallServerProxy.RefusedRefund(para); switch (result) { case RefundResult.Success: GlobalMessageBox.Show("已拒绝退款!"); Display(EmRetailOrder.GetRefundState(RefundStateEnum.Refused)); break; case RefundResult.StateIsError: GlobalMessageBox.Show("退款申请状态不符合要求!"); break; case RefundResult.IsRefund: GlobalMessageBox.Show("已经退过货!"); break; case RefundResult.MemberIsNotExist: GlobalMessageBox.Show("会员不存在!"); break; case RefundResult.Error: GlobalMessageBox.Show("内部错误!"); break; default: break; } this.DialogResult = DialogResult.OK; } } catch (Exception ee) { GlobalUtil.ShowError(ee); } //finally //{ // GlobalUtil.UnLockPage(this); //} }
public EmOrderLogisticsCtrl(EmRetailOrder order) { InitializeComponent(); this.Order = order; Display(); }
private void Initialize(Boolean showError) { try { if (CommonGlobalUtil.EngineUnconnectioned(this, false, showError)) { return; } WorkTableInfoPara para = new WorkTableInfoPara() { ShopID = CommonGlobalCache.CurrentShopID, IsPos = IsPos }; WorkTableInfo workTableInfo = CommonGlobalCache.ServerProxy.WorkTableInfo(para); if (workTableInfo == null) { return; } if (IsPos) { //盘点待审核 skinLabel7.Visible = false; skinLabel4.Visible = false; linkLabel_checkOrderCount.Visible = false; //线上订单待发货 skinLabel15.Visible = false; skinLabel17.Visible = false; linkLabelOnlineOrder.Visible = false; //线上退货单 skinLabel16.Visible = false; skinLabel18.Visible = false; linkLabelOnlineOrderRefund.Visible = false; } GetAllocateOrdersPara pagePara = new GetAllocateOrdersPara() { AllocateOrderID = null, AllocateOrderState = AllocateOrderState.Normal, CostumeID = null, EndDate = new CJBasic.Date(DateTime.Now), StartDate = new CJBasic.Date("1900-01-01"), ShopID = "", Type = AllocateOrderType.All, PageIndex = 0, PageSize = 20, ReceiptState = ReceiptState.WaitReceipt, LockShop = HasPermission(RolePermissionMenuEnum.调拨单查询, RolePermissionEnum.查看_只看本店), DestShopID = CommonGlobalCache.CurrentShopID, SourceShopID = "", }; InteractResult <AllocateOrderPage> listPage = CommonGlobalCache.ServerProxy.GetAllocateOrders(pagePara); this.linkLabel_UnconfirmedAllocateOrderCount.Text = listPage.Data.AllocateOrderList.Count.ToString(); linkLabelNewMember.Text = workTableInfo.TodayAddMemberCount.ToString(); CheckStoreOrderPagePara checkPagePara = new CheckStoreOrderPagePara() { CheckStoreOrderID = null, IsOpenDate = true, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, //ShopID = CommonGlobalCache.CurrentShopID, CostumeID = null, State = CheckStoreOrderState.PendingReview, }; CheckStoreOrderPage ChecklistPage = CommonGlobalCache.ServerProxy.GetCheckStoreOrderPage(checkPagePara); this.linkLabel_checkOrderCount.Text = ChecklistPage.CheckStoreOrderList.Count.ToString(); DifferenceOrderPagePara checkOrderPagePara = new DifferenceOrderPagePara() { OrderID = null, CostumeID = null, IsOpenDate = true, IsOnlyGetOut = true, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, ShopID = CommonGlobalCache.CurrentShopID, OrderPrefixType = ValidateUtil.CheckEmptyValue(OrderPrefix.AllocateOrder), DifferenceOrderConfirmed = DifferenceOrderConfirmed.False, }; DifferenceOrderPage checkOrderListPage = CommonGlobalCache.ServerProxy.GetDifferenceOrderPage(checkOrderPagePara); this.DifferenceOrderConfirmedIsFalseCount.Text = checkOrderListPage.DifferenceOrderList.Count.ToString(); GetEmOrderPagePara EmpagePara = new GetEmOrderPagePara() { OrderID = null, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, MemberPhoneOrName = null, CostumeIDOrName = null, OrderState = EmRetailOrderState.WaitDelivery, RefundStatus = RefundStatus.NotSelect, }; EmOrderPage EmlistPage = CommonGlobalCache.ServerProxy.GetEmOrderPage(EmpagePara); //开通erp 且未开通线上商城 ,线上商城和工作台两个线上订单数字,灰掉 if (!CommonGlobalCache.BusinessAccount.OnlineEnabled && CommonGlobalCache.BusinessAccount.ERPEnabled == true) { linkLabelOnlineOrder.Enabled = false; linkLabelOnlineOrderRefund.Enabled = false; } //未开通erp 但是开通了线上商城 if (CommonGlobalCache.BusinessAccount.OnlineEnabled && !CommonGlobalCache.BusinessAccount.ERPEnabled) { skinLabel4.Visible = false; skinLabel3.Visible = false; skinLabel6.Visible = false; skinLabel7.Visible = false; skinLabel9.Visible = false; skinLabel10.Visible = false; linkLabel_UnconfirmedAllocateOrderCount.Visible = false; DifferenceOrderConfirmedIsFalseCount.Visible = false; linkLabel_checkOrderCount.Visible = false; skinLabel14.Visible = false; linkLabelNewMember.Visible = false; } linkLabelOnlineOrder.Text = EmlistPage.ResultList.Count.ToString(); GetEmOrderPagePara EmReturnpagePara = new GetEmOrderPagePara() { OrderID = null, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, MemberPhoneOrName = null, CostumeIDOrName = null, OrderState = EmRetailOrderState.All, RefundStatus = RefundStatus.Refunding, }; EmOrderPage EmReturnlistPage = CommonGlobalCache.ServerProxy.GetEmOrderPage(EmReturnpagePara); int rows = EmReturnlistPage.ResultList.FindAll(t => t.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.RefundApplication) || t.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.Refunding)).Count; linkLabelOnlineOrderRefund.Text = rows.ToString(); if (workTableInfo.IsCostumeStoreHaveNegative) { linkLabel1.Text = "有"; linkLabel1.ForeColor = Color.Red; linkLabel1.Enabled = true; } else { linkLabel1.Text = "无"; linkLabel1.DisabledLinkColor = Color.Green; linkLabel1.Enabled = false; } // RefreshStoreState(workTableInfo.CostumeStoreLocked); //CommonGlobalCache.IsCheckStoreState = workTableInfo.CostumeStoreLocked; } catch (Exception ex) { ShowError(ex, showError); } finally { UnLockPage(); } }
public void HandleInformation(string sourceUserID, int informationType, byte[] info) { GlobalUtil.WriteLog("收到通知" + informationType); #region 充值规则更改 if (NoticeInformationTypes.UpdateRechargeDonateRule == informationType) { RechargeDonateRule rechargeDonateRule = CompactPropertySerializer.Default.Deserialize <RechargeDonateRule>(info, 0); GlobalCache.UpdateRechargeDonateRule(rechargeDonateRule); } else if (NoticeInformationTypes.DeleteRechargeDonateRule == informationType) { GlobalCache.DeleteRechargeDonateRule(); } else if (NoticeInformationTypes.UpdateShopRechargeRuleID == informationType) { RechargeDonateRule rechargeDonateRule = CompactPropertySerializer.Default.Deserialize <RechargeDonateRule>(info, 0); GlobalCache.UpdateShopRechargeRuleID(rechargeDonateRule); } #endregion #region 系统配置更改 else if (NoticeInformationTypes.UpdateParameterConfig == informationType) { ParameterConfig c = CompactPropertySerializer.Default.Deserialize <ParameterConfig>(info, 0); GlobalCache.ParameterConfig(c); } else if (NoticeInformationTypes.UpdateParameterConfigs == informationType) { List <ParameterConfig> collection = CompactPropertySerializer.Default.Deserialize <List <ParameterConfig> >(info, 0); foreach (var item in collection) { GlobalCache.ParameterConfig(item); } } #endregion #region 导购员信息更改 else if (NoticeInformationTypes.UpdateGuide == informationType) { Guide guide = CompactPropertySerializer.Default.Deserialize <Guide>(info, 0); GlobalCache.UpdateGuide(guide); } else if (NoticeInformationTypes.InsertGuide == informationType) { Guide guide = CompactPropertySerializer.Default.Deserialize <Guide>(info, 0); GlobalCache.InsertGuide(guide); } else if (NoticeInformationTypes.DeleteGuide == informationType) { string guideID = Encoding.UTF8.GetString(info); GlobalCache.DeleteGuide(guideID); } else if (NoticeInformationTypes.DeleteGuides == informationType) { List <String> guideIDs = CompactPropertySerializer.Default.Deserialize <List <String> >(info, 0); foreach (var guideID in guideIDs) { GlobalCache.DeleteGuide(guideID); } } #endregion #region 促销活动更改 else if (NoticeInformationTypes.InsertSalesPromotion == informationType) { SalesPromotion salesPromotion = CompactPropertySerializer.Default.Deserialize <SalesPromotion>(info, 0); GlobalCache.InsertSalesPromotion(salesPromotion); } else if (NoticeInformationTypes.DeleteSalesPromotion == informationType) { string salesPromotionID = Encoding.UTF8.GetString(info); GlobalCache.DeleteSalesPromotion(salesPromotionID); } else if (NoticeInformationTypes.UpdateSalesPromotion == informationType) { SalesPromotion salesPromotion = CompactPropertySerializer.Default.Deserialize <SalesPromotion>(info, 0); GlobalCache.UpdateSalesPromotion(salesPromotion); } #endregion #region 品牌配置更改 else if (NoticeInformationTypes.InsertBrand == informationType) { Brand brand = CompactPropertySerializer.Default.Deserialize <Brand>(info, 0); GlobalCache.InsertBrand(brand); } else if (NoticeInformationTypes.UpdateBrand == informationType) { Brand brand = CompactPropertySerializer.Default.Deserialize <Brand>(info, 0); GlobalCache.UpdateBrand(brand); } else if (NoticeInformationTypes.DeleteBrand == informationType) { int brandID = BitConverter.ToInt32(info, 0); GlobalCache.DeleteBrand(brandID); } #endregion #region 装信息更改 //新增服装 else if (NoticeInformationTypes.InsertCostume == informationType) { Costume costume = CompactPropertySerializer.Default.Deserialize <Costume>(info, 0); GlobalCache.InsertCostume(costume); } //服装信息更改 else if (NoticeInformationTypes.UpdateCostume == informationType) { Costume costume = CompactPropertySerializer.Default.Deserialize <Costume>(info, 0); GlobalCache.UpdateCostume(costume); } else if (NoticeInformationTypes.DeleteCostume == informationType) { string costumeID = Encoding.UTF8.GetString(info); GlobalCache.DeleteCostume(costumeID); } else if (NoticeInformationTypes.InsertCostumes == informationType) { List <Costume> costumes = CompactPropertySerializer.Default.Deserialize <List <Costume> >(info, 0); foreach (var costume in costumes) { GlobalCache.InsertCostume(costume); } } else if (NoticeInformationTypes.UpdateCostumes == informationType) { List <Costume> costumes = CompactPropertySerializer.Default.Deserialize <List <Costume> >(info, 0); foreach (var costume in costumes) { GlobalCache.UpdateCostume(costume); } } else if (NoticeInformationTypes.UpdateCostumeValid == informationType) { UpdateCostumeValidPara result = CompactPropertySerializer.Default.Deserialize <UpdateCostumeValidPara>(info, 0); GlobalCache.UpdateCostumeValid(result); } else if (NoticeInformationTypes.InsertCostumeStores == informationType) { GlobalCache.LoadCostumeInfos(); } #endregion #region 管理员信息更改 //新增管理员 else if (NoticeInformationTypes.InsertAdminUser == informationType) { AdminUser adminUser = CompactPropertySerializer.Default.Deserialize <AdminUser>(info, 0); GlobalCache.InsertAdminUser(adminUser); } //管理员信息更改 else if (NoticeInformationTypes.UpdateAdminUser == informationType) { AdminUser adminUser = CompactPropertySerializer.Default.Deserialize <AdminUser>(info, 0); GlobalCache.UpdateAdminUser(adminUser); } #endregion #region 供应商信息更改 //新增供应商 else if (NoticeInformationTypes.InsertSupplier == informationType) { Supplier supplier = CompactPropertySerializer.Default.Deserialize <Supplier>(info, 0); GlobalCache.InsertSupplier(supplier); } else if (NoticeInformationTypes.ImportSupplier == informationType) { List <Supplier> suppliers = CompactPropertySerializer.Default.Deserialize <List <Supplier> >(info, 0); if (suppliers != null) { foreach (var supplier in suppliers) { GlobalCache.InsertSupplier(supplier); } } } //供应商信息更改 else if (NoticeInformationTypes.UpdateSupplier == informationType) { Supplier supplier = CompactPropertySerializer.Default.Deserialize <Supplier>(info, 0); GlobalCache.UpdateSupplier(supplier); } //删除供应商 else if (NoticeInformationTypes.DeleteSupplier == informationType) { string supplierID = Encoding.UTF8.GetString(info); GlobalCache.DeleteSupplier(supplierID); } #endregion #region 店铺更改 //新增店铺 else if (NoticeInformationTypes.InsertShop == informationType) { Shop shop = CompactPropertySerializer.Default.Deserialize <Shop>(info, 0); GlobalCache.InsertShop(shop); } //店铺信息更改 else if (NoticeInformationTypes.UpdateShop == informationType) { Shop shop = CompactPropertySerializer.Default.Deserialize <Shop>(info, 0); GlobalCache.UpdateShop(shop); } else if (NoticeInformationTypes.DisableShop == informationType) { String shopID = Encoding.UTF8.GetString(info); GlobalCache.DisableShop(shopID); } else if (NoticeInformationTypes.DeleteShop == informationType) { String shopID = Encoding.UTF8.GetString(info); GlobalCache.RemoveShop(shopID); } //Todo: #endregion else if (NoticeInformationTypes.InsertDifferenceOrder == informationType) { int result = SerializeHelper.ByteArrayToInt(info); DifferenceOrderPagePara checkOrderPagePara = new DifferenceOrderPagePara() { OrderID = null, CostumeID = null, IsOpenDate = true, IsOnlyGetOut = true, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, ShopID = CommonGlobalCache.CurrentShopID, OrderPrefixType = ValidateUtil.CheckEmptyValue(OrderPrefix.AllocateOrder), DifferenceOrderConfirmed = DifferenceOrderConfirmed.False, }; DifferenceOrderPage checkOrderListPage = CommonGlobalCache.ServerProxy.GetDifferenceOrderPage(checkOrderPagePara); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有" + checkOrderListPage.DifferenceOrderList.Count + "张差异单待处理,请及时处理!" + "#" + informationType); } #region 新的补货申请单待处理通知 else if (NoticeInformationTypes.ReplenishOutbound == informationType) { ReplenishCostumePagePara pageParaReplenish = new ReplenishCostumePagePara() { CostumeID = null, ReplenishOrderID = null, IsOpenDate = true, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 10000, ShopID = CommonGlobalCache.CurrentShopID, ReplenishOrderState = ReplenishOrderState.NotProcessing, BrandID = -1 }; ReplenishCostumePage listPageReplenish = CommonGlobalCache.ServerProxy.GetReplenishCostumePage(pageParaReplenish); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有" + listPageReplenish.ReplenishOrderList.Count + "张待发货的补货申请单待处理,请及时处理!" + "#" + informationType); } else if (NoticeInformationTypes.AllocateOutbound == informationType) { int result = SerializeHelper.ByteArrayToInt(info); if (GlobalCache.GetParameter(ParameterConfigKey.AllocateInDirectly)?.ParaValue == "1") { ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有新的调拨单已入库!"); } else { GetAllocateOrdersPara pagePara = new GetAllocateOrdersPara() { AllocateOrderID = null, AllocateOrderState = AllocateOrderState.Normal, CostumeID = null, EndDate = new CJBasic.Date(DateTime.Now), StartDate = new CJBasic.Date("1900-01-01"), ShopID = "", Type = AllocateOrderType.All, PageIndex = 0, PageSize = 20, ReceiptState = ReceiptState.WaitReceipt, LockShop = PermissonUtil.HasPermission(RolePermissionMenuEnum.调拨单查询, RolePermissionEnum.查看_只看本店), DestShopID = CommonGlobalCache.CurrentShopID, SourceShopID = "", }; InteractResult <AllocateOrderPage> listPage = CommonGlobalCache.ServerProxy.GetAllocateOrders(pagePara); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有" + listPage.Data.AllocateOrderList.Count + "张调拨单待处理,请及时处理!" + "#" + informationType); } } else if (NoticeInformationTypes.ReplenishCostume == informationType) { int result = SerializeHelper.ByteArrayToInt(info); ReplenishCostumePagePara pageParaReplenish = new ReplenishCostumePagePara() { CostumeID = null, ReplenishOrderID = null, IsOpenDate = true, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 10000, ShopID = CommonGlobalCache.CurrentShopID, ReplenishOrderState = ReplenishOrderState.NotProcessing, BrandID = -1 }; ReplenishCostumePage listPageReplenish = CommonGlobalCache.ServerProxy.GetReplenishCostumePage(pageParaReplenish); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有补货申请单待处理,请及时处理!" + "#" + informationType); } #endregion #region 盘点已审核通知 else if (NoticeInformationTypes.CheckStorePass == informationType) { GlobalUtil.WriteLog("盘点已审核通知"); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您的盘点单已审核,请及时查收!" + "#" + informationType); // GlobalUtil.MainForm.OnStoreStateChanged(false); } #endregion #region 盘点退回通知 /* else if (NoticeInformationTypes.CancelCheckStore == informationType) * { * GlobalUtil.WriteLog("盘点退回通知"); * ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您的盘点单被退回,请及时查收!" + "#" + informationType); * * } */ #endregion #region 补货申请单/调拨单冲单通知 else if (NoticeInformationTypes.OverrideOrder == informationType) { string result = String.Empty; if (info != null) { result = Encoding.UTF8.GetString(info); } GlobalUtil.WriteLog("补货申请单/或调拨单" + result + "冲单通知"); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您的" + GlobalUtil.OrderType(result) + "单" + result + "被冲单,请及时查收!" + "#" + informationType); } #endregion #region 补货申请单取消 else if (NoticeInformationTypes.CancelReplenish == informationType) { string result = String.Empty; if (info != null) { result = Encoding.UTF8.GetString(info); } GlobalUtil.WriteLog("补货申请单" + result + "取消通知"); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您的" + GlobalUtil.OrderType(result) + "单" + result + "被取消,请及时查收!" + "#" + informationType); } #endregion else if (NoticeInformationTypes.NewEmRefundOrder == informationType) { int result = SerializeHelper.ByteArrayToInt(info); GetEmOrderPagePara EmReturnpagePara = new GetEmOrderPagePara() { OrderID = null, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, MemberPhoneOrName = null, CostumeIDOrName = null, OrderState = EmRetailOrderState.All, RefundStatus = RefundStatus.Refunding, }; EmOrderPage EmReturnlistPage = CommonGlobalCache.ServerProxy.GetEmOrderPage(EmReturnpagePara); int rows = EmReturnlistPage.ResultList.FindAll(t => t.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.RefundApplication) || t.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.Refunding)).Count; ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有" + rows + "张线上退货待处理,请及时处理!" + "#" + informationType); } else if (NoticeInformationTypes.NewEmRetailOrder == informationType) { int result = SerializeHelper.ByteArrayToInt(info); GetEmOrderPagePara EmpagePara = new GetEmOrderPagePara() { OrderID = null, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, MemberPhoneOrName = null, CostumeIDOrName = null, OrderState = EmRetailOrderState.WaitDelivery, RefundStatus = RefundStatus.NotSelect, }; EmOrderPage EmlistPage = CommonGlobalCache.ServerProxy.GetEmOrderPage(EmpagePara); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有" + EmlistPage.ResultList.Count + "张线上订单待处理,请及时处理!" + "#" + informationType); } #region 批发客户信息更改 //新增供应商 else if (NoticeInformationTypes.InsertPfCustomer == informationType) { PfCustomer supplier = CompactPropertySerializer.Default.Deserialize <PfCustomer>(info, 0); PfCustomerCache.InsertPfCustomer(supplier); } else if (NoticeInformationTypes.ImportPfCustomer == informationType) { List <PfCustomer> suppliers = CompactPropertySerializer.Default.Deserialize <List <PfCustomer> >(info, 0); foreach (var supplier in suppliers) { PfCustomerCache.InsertPfCustomer(supplier); } } //供应商信息更改 else if (NoticeInformationTypes.UpdatePfCustomer == informationType) { PfCustomer supplier = CompactPropertySerializer.Default.Deserialize <PfCustomer>(info, 0); PfCustomerCache.UpdatePfCustomer(supplier); } //删除供应商 else if (NoticeInformationTypes.DeletePfCustomer == informationType) { string supplierID = Encoding.UTF8.GetString(info); PfCustomerCache.DeletePfCustomer(supplierID); } #endregion #region 盘点待处理通知 else if (NoticeInformationTypes.InsertCheckStore == informationType) { GlobalUtil.WriteLog("盘点待处理通知"); CheckStoreOrderPagePara checkPagePara = new CheckStoreOrderPagePara() { CheckStoreOrderID = null, IsOpenDate = true, StartDate = new CJBasic.Date("1900-01-01"), EndDate = new CJBasic.Date(DateTime.Now), PageIndex = 0, PageSize = 1000, //ShopID = CommonGlobalCache.CurrentShopID, CostumeID = null, State = CheckStoreOrderState.PendingReview, }; CheckStoreOrderPage ChecklistPage = CommonGlobalCache.ServerProxy.GetCheckStoreOrderPage(checkPagePara); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有" + ChecklistPage.CheckStoreOrderList.Count + "张盘点单待审核,请及时处理!" + "#" + informationType); } #endregion #region 盘点退回通知 else if (NoticeInformationTypes.CancelCheckStore == informationType) { GlobalUtil.WriteLog("盘点退回通知"); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您的盘点单被退回,请及时处理!" + "#" + informationType); } #endregion #region 盘点取消通知 else if (NoticeInformationTypes.CancelCheckStoreTask == informationType) { GlobalUtil.WriteLog("盘点取消通知"); ((MainForm)GlobalUtil.MainForm).OnNewInfomation("您有盘点已取消!"); } #endregion else if (NoticeInformationTypes.EnabledSizeGroup == informationType) { EnabledSizeGroupPara sizeGroup = CompactPropertySerializer.Default.Deserialize <EnabledSizeGroupPara>(info, 0); GlobalCache.EnabledSizeGroup(sizeGroup); } else if (NoticeInformationTypes.InsertSizeGroup == informationType) { SizeGroup sizeGroup = CompactPropertySerializer.Default.Deserialize <SizeGroup>(info, 0); GlobalCache.InsertSizeGroup(sizeGroup); } else if (NoticeInformationTypes.UpdateSizeGroup == informationType) { SizeGroup sizeGroup = CompactPropertySerializer.Default.Deserialize <SizeGroup>(info, 0); GlobalCache.UpdateSizeGroup(sizeGroup); } else if (NoticeInformationTypes.DeleteSizeGroup == informationType) { String SizeGroupName = Encoding.UTF8.GetString(info); GlobalCache.DeleteSizeGroup(SizeGroupName); } else if (NoticeInformationTypes.UpdateSizeNames == informationType) { UpdateSizeNamesInfo sizeNameInfo = CompactPropertySerializer.Default.Deserialize <UpdateSizeNamesInfo>(info, 0); GlobalCache.UpdateSizeNames(sizeNameInfo); } else if (NoticeInformationTypes.InsertDistributor == informationType) { Distributor supplier = CompactPropertySerializer.Default.Deserialize <Distributor>(info, 0); GlobalCache.InsertDistributor(supplier); } else if (NoticeInformationTypes.UpdateDistributor == informationType) { Distributor supplier = CompactPropertySerializer.Default.Deserialize <Distributor>(info, 0); GlobalCache.UpdateDistributor(supplier); } #region 批发客户信息更改 //新增供应商 else if (NoticeInformationTypes.InsertPfCustomer == informationType) { PfCustomer supplier = CompactPropertySerializer.Default.Deserialize <PfCustomer>(info, 0); PfCustomerCache.InsertPfCustomer(supplier); } //供应商信息更改 else if (NoticeInformationTypes.UpdatePfCustomer == informationType) { PfCustomer supplier = CompactPropertySerializer.Default.Deserialize <PfCustomer>(info, 0); PfCustomerCache.UpdatePfCustomer(supplier); } //删除供应商 else if (NoticeInformationTypes.DeletePfCustomer == informationType) { string supplierID = Encoding.UTF8.GetString(info); PfCustomerCache.DeletePfCustomer(supplierID); } else if (NoticeInformationTypes.SendAnnounce == informationType) { int result = SerializeHelper.ByteArrayToInt(info); Announce announce = CompactPropertySerializer.Default.Deserialize <Announce>(info, 0); //1:发布中,2:已完成,3:已取消 AnnounceState state = (AnnounceState)announce.State; switch (state) { case AnnounceState.Finished: case AnnounceState.Cancel: ((MainForm)GlobalUtil.MainForm).SendAnnounce(state); break; case AnnounceState.Releasing: CommonGlobalCache.SystemUpdateMessage = announce.AnnounceContent; ((MainForm)GlobalUtil.MainForm).OnNewInfomation("系统升级公告\r\n尊敬的客户:\r\n" + announce.AnnounceContent); ((MainForm)GlobalUtil.MainForm).SendAnnounce(state); break; default: break; } } else if (NoticeInformationTypes.NoticeClose == informationType) { ((MainForm)GlobalUtil.MainForm).DoClose(); // System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location); } #endregion }
public void WorkDeskFilteCtrlSearch(EmRetailOrderState orderState, RefundStatus refund) { if (orderState == EmRetailOrderState.All && refund == RefundStatus.Refunding) { tabControl1.SelectTab(4); } else if (orderState == EmRetailOrderState.WaitDelivery && refund == RefundStatus.NotSelect) { tabControl1.SelectTab(2); } DateTimeUtil.DateTimePicker_All(dateTimePicker_Start, dateTimePicker_End); GetEmOrderPagePara pageParaOfWork = new GetEmOrderPagePara() { OrderID = this.skinTextBoxOrderId.Text, StartDate = new Date(this.dateTimePicker_Start.Value), EndDate = new Date(this.dateTimePicker_End.Value), PageIndex = 0, PageSize = this.dataGridViewPagingSumCtrl.PageSize, MemberPhoneOrName = null, CostumeIDOrName = null, OrderState = EmRetailOrderState.All, RefundStatus = RefundStatus.Refunding, }; EmOrderPage listPage = GlobalCache.EMallServerProxy.GetEmOrderPage(pageParaOfWork); List <EmRetailOrder> orderList = listPage.ResultList.FindAll(t => t.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.RefundApplication) || t.RefundStateName == EmRetailOrder.GetRefundState(RefundStateEnum.Refunding)); dataGridViewPagingSumCtrl.OrderPara = pagePara; //this.dataGridViewPagingSumCtrl.Initialize(orderList); splitContainer1.Panel2Collapsed = true; this.dataGridViewPagingSumCtrl.BindingDataSource <EmRetailOrder>(orderList, null, orderList.Count); if (orderList != null && orderList.Count > 0) { dataGridView1_SelectionChanged(dataGridView1, null); } UpdateTabPageTitle(false); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (!DataGridViewUtil.CheckPerrmisson(this, sender, e)) { return; } try { if (e.RowIndex > -1 && e.ColumnIndex > -1 && !dataGridView1.Rows[e.RowIndex].IsNewRow) { DataGridView view = (DataGridView)sender; List <EmRetailOrder> list = (List <EmRetailOrder>)view.DataSource; EmRetailOrder item = (EmRetailOrder)list[e.RowIndex]; // splitContainer1.Panel2Collapsed = true; DataGridViewCell cell = view.Rows[e.RowIndex].Cells[e.ColumnIndex]; switch (cell.OwningColumn.HeaderText) { case "查看物流": // this.LogisticsClick?.Invoke(item, this.splitContainer1.Panel2); // splitContainer1.Panel2Collapsed = false; break; case "操作": // splitContainer1.Panel2Collapsed = false; // this.DetailClick?.Invoke(item, this, this.splitContainer1.Panel2); if ("发货".Equals(cell.FormattedValue)) { ShowDeliver(item); } else if ("查看物流".Equals(cell.FormattedValue)) { ShowLogistic(item); } else if ("待商家处理".Equals(cell.FormattedValue)) { ShowWaitSeller(item); } else if ("待买家处理".Equals(cell.FormattedValue)) { ShowWaitBuyer(item); } else if ("退款成功".Equals(cell.FormattedValue)) { ShowReturnSuccess(item); } break; case "订单编号": splitContainer1.Panel2Collapsed = false; this.DetailClick?.Invoke(item, this, this.splitContainer1.Panel2); break; case "导出": path = CJBasic.Helpers.FileHelper.GetPathToSave("保存文件", "零售订单" + item.ID + new Date(DateTime.Now).ToDateInteger() + ".xls", Environment.GetFolderPath(Environment.SpecialFolder.Personal)); if (String.IsNullOrEmpty(path)) { return; } Export(item); break; default: break; } } } catch (Exception ex) { GlobalUtil.ShowError(ex); } }
private void Export(EmRetailOrder order) { try { List <String> keys = new List <string>(); List <String> values = new List <string>(); keys.Add("CostumeID"); keys.Add("CostumeName"); keys.Add("单位"); keys.Add("渠道供货商"); keys.Add("ColorID"); keys.Add("ColorName"); keys.Add("Size"); // keys.Add("F"); keys.Add("XS"); keys.Add("S"); keys.Add("M"); keys.Add("L"); keys.Add("XL"); keys.Add("2XL"); keys.Add("3XL"); keys.Add("4XL"); keys.Add("5XL"); keys.Add("6XL"); keys.Add("SameSize"); keys.Add("Count"); keys.Add("NOticeCount"); keys.Add("DiffCount"); keys.Add("SalePrice"); keys.Add("Discount"); keys.Add("SaleSinglePrice"); keys.Add("SaleTotalPrice"); keys.Add("Remark"); #region values.Add("商品代码"); values.Add("商品名称"); values.Add("单位"); values.Add("渠道供货商"); values.Add("色号"); values.Add("颜色"); values.Add("尺码档"); // values.Add("F"); values.Add("XS"); values.Add("S"); values.Add("M"); values.Add("L"); values.Add("XL"); values.Add("2XL"); values.Add("3XL"); values.Add("4XL"); values.Add("5XL"); values.Add("6XL"); values.Add("均码"); values.Add("数量"); values.Add("通知数"); values.Add("差异数"); values.Add("标准价"); values.Add("折扣"); values.Add("单价"); values.Add("金额"); values.Add("摘要"); #endregion DataTable dt = new DataTable(); dt.Columns.Add("CostumeID"); dt.Columns.Add("CostumeName"); dt.Columns.Add("单位"); dt.Columns.Add("渠道供货商"); dt.Columns.Add("ColorID"); dt.Columns.Add("ColorName"); dt.Columns.Add("Size"); // dt.Columns.Add("F"); dt.Columns.Add("XS"); dt.Columns.Add("S"); dt.Columns.Add("M"); dt.Columns.Add("L"); dt.Columns.Add("XL"); dt.Columns.Add("2XL"); dt.Columns.Add("3XL"); dt.Columns.Add("4XL"); dt.Columns.Add("5XL"); dt.Columns.Add("6XL"); dt.Columns.Add("SameSize"); dt.Columns.Add("Count"); dt.Columns.Add("NOticeCount"); dt.Columns.Add("DiffCount"); dt.Columns.Add("SalePrice"); dt.Columns.Add("Discount"); dt.Columns.Add("SaleSinglePrice"); dt.Columns.Add("SaleTotalPrice"); dt.Columns.Add("Remark"); // List<EmRetailDetail> listPage = GlobalCache.EMallServerProxy.GetEmRetailDetail(order.ID); InteractResult <EmOrderExportData> exportList = GlobalCache.ServerProxy.GetEmRetailOrderExportData(order.ID); // exportList.Data.Details int noticeNum = 0; if (exportList.Data != null && exportList.Data.Details != null && exportList.Data.Details.Count > 0) { foreach (EmOrderExportDetail eDetail in exportList.Data.Details) { DataRow dr = dt.NewRow(); dr["CostumeID"] = eDetail.CostumeID; dr["CostumeName"] = eDetail.CostumeName; dr["ColorID"] = eDetail.ColorID; dr["ColorName"] = eDetail.ColorName; dr["Size"] = ""; // dr["F"] = eDetail.F; dr["XS"] = eDetail.XS.ToString() == "0"? "": eDetail.XS.ToString(); dr["S"] = eDetail.S.ToString() == "0"?"": eDetail.S.ToString(); dr["M"] = eDetail.M.ToString() == "0" ? "" : eDetail.M.ToString(); dr["L"] = eDetail.L.ToString() == "0" ? "" : eDetail.L.ToString(); dr["XL"] = eDetail.XL.ToString() == "0" ? "" : eDetail.XL.ToString(); dr["2XL"] = eDetail.XL2.ToString() == "0" ? "" : eDetail.XL2.ToString(); dr["3XL"] = eDetail.XL3.ToString() == "0" ? "" : eDetail.XL3.ToString(); dr["4XL"] = eDetail.XL4.ToString() == "0" ? "" : eDetail.XL4.ToString(); dr["5XL"] = eDetail.XL5.ToString() == "0" ? "" : eDetail.XL5.ToString(); dr["6XL"] = eDetail.XL6.ToString() == "0" ? "" : eDetail.XL6.ToString(); dr["SameSize"] = eDetail.F.ToString() == "0" ? "" : eDetail.F.ToString(); dr["Count"] = eDetail.Count.ToString() == "0" ? "" : eDetail.Count.ToString(); dr["NOticeCount"] = eDetail.NoticeCount; dr["DiffCount"] = eDetail.DifferenceCount; dr["SalePrice"] = eDetail.OnlinePrice; dr["Discount"] = eDetail.Discount; dr["SaleSinglePrice"] = eDetail.Price; dr["SaleTotalPrice"] = eDetail.SumMoney; dr["Remark"] = eDetail.Remarks; dt.Rows.Add(dr); noticeNum += eDetail.NoticeCount; } } NPOIHelper.hsRowCount = 22; List <CellType> cellList = EmExportUtil.getSaleCellList(exportList.Data); NPOIHelper.CellValues = cellList; List <CellType> cellButtomList = new List <CellType>(); NPOIHelper.bottomHsRowCount = 1; CellType curCellIT = new CellType(); curCellIT.RowIndex = dt.Rows.Count + 23; curCellIT.CellName = "合计:"; curCellIT.IsCollect = true; curCellIT.CellMergeNum = 1; cellButtomList.Add(curCellIT); for (int k = 0; k < 18; k++) { CellType curCellI = new CellType(); curCellI.RowIndex = dt.Rows.Count + 23; curCellI.CellName = ""; curCellI.CellMergeNum = 1; cellButtomList.Add(curCellI); } CellType curCellTotal = new CellType(); curCellTotal.RowIndex = dt.Rows.Count + 23;//1是要多加一行标题列 curCellTotal.CellName = noticeNum.ToString(); curCellTotal.IsCollect = true; curCellTotal.CellMergeNum = 1; cellButtomList.Add(curCellTotal); NPOIHelper.BottomCellValues = cellButtomList; NPOIHelper.Keys = keys.ToArray(); NPOIHelper.Values = values.ToArray(); NPOIHelper.ExportExcel(dt, path); GlobalMessageBox.Show("导出完毕!"); } catch (Exception ex) { ShowError(ex); } finally { UnLockPage(); } }