Exemplo n.º 1
0
        private void dgProductQueryResult_ExportAllDataSource(object sender, EventArgs e)
        {
            ProductQueryFacade facade = new ProductQueryFacade(this);
            var _vm = (ProductQueryExVM)this.DataContext;

            if (_vm != null && _vm.PMUserCondition <= 0)
            {
                setPMUserCondition(_vm);
            }
            ColumnSet columnSet = new ColumnSet(this.ucProductQueryResult.dgProductQueryResult);

            //SysNo GroupID ProductID ProductTitle
            columnSet.Insert(0, new ColumnData()
            {
                FieldName = "C3SysNo", Title = "三级类别"
            });
            columnSet.Insert(0, new ColumnData()
            {
                FieldName = "C2SysNo", Title = "二级类别"
            });
            columnSet.Insert(0, new ColumnData()
            {
                FieldName = "C1SysNo", Title = "一级类别"
            });
            if (columnSet["MerchantNameDisplay"] != null)
            {
                columnSet["MerchantNameDisplay"].FieldName = "MerchantName";
            }
            facade.ExportAllProductToExcel(_vm, new ColumnSet[] { columnSet });
        }
        /// <summary>
        /// 导出卡号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnExport_Click(object sender, RoutedEventArgs e)
        {
            //CreateGiftCardInfoList

            //ResetGiftCardFabrication
            //GiftCardFabricationMaster item = new GiftCardFabricationMaster();
            //item = VM.ConvertVM<GiftCardFabricationVM, GiftCardFabricationMaster>();
            //foreach (GiftCardFabricationItemVM gift in gridVM)
            //{
            //    item.GiftCardFabricationList.Add(gift.ConvertVM <GiftCardFabricationItemVM, GiftCardFabrication>());
            //}

            facade.GetAddGiftCardInfoList(VM.SysNo.Value, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                if (args.Result)
                {
                    ColumnSet col = new ColumnSet();
                    col.Insert(0, "TransactionNumber", ResGiftCardInfo.Column_SysNo);
                    col.Insert(1, "Code", ResGiftCardInfo.Column_CardSysNo);
                    col.Insert(2, "Password", ResGiftCardInfo.Column_Password);
                    col.Insert(3, "BarCode", ResGiftCardInfo.Column_BarCard);
                    col.Insert(4, "TotalAmount", ResGiftCardInfo.Column_Amount);
                    facade.ExportGiftCardExcelFile(VM.SysNo.Value, new ColumnSet[] { col });

                    if (Dialog != null)
                    {
                        Dialog.ResultArgs.Data         = null;
                        Dialog.ResultArgs.DialogResult = DialogResultType.OK;
                        Dialog.Close();
                    }
                }
                else
                {
                    CPApplication.Current.CurrentPage.Context.Window.Alert(ResGiftCardInfo.Information_GiftCardIsInProcess, MessageType.Warning);
                }
                //??????????
                //facade.ResetGiftCardFabrication(item.SysNo.Value, (obj2, args2) =>
                //{
                //    if (args2.FaultsHandle())
                //        return;

                //    CPApplication.Current.CurrentPage.Context.Window.Alert("操作成功!", MessageType.Information);
                //});
            });
        }
Exemplo n.º 3
0
        private void dgSaleIncomeQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (lastQueryVM == null || this.dgSaleIncomeQueryResult.TotalCount <= 0)
            {
                Window.Alert(ResCommon.Message_NoData2Export);
                return;
            }

            ColumnSet col = new ColumnSet(this.dgSaleIncomeQueryResult);

            col.Insert(3, "OrderType", ResSaleIncomeQuery.Grid_OrderType);
            //col.Insert(7, "PayTypeName", ResSaleIncomeQuery.Grid_PayType);
            // col.Insert(8, "ShipTypeName", ResSaleIncomeQuery.Grid_ShipType);
            col.Insert(17, "ReturnCashAmt", ResSaleIncomeQuery.Grid_ReturnCash);
            col.Insert(19, "ReturnPointAmt", ResSaleIncomeQuery.Grid_ReturnPoint);
            col.Insert(20, "ToleranceAmt", ResSaleIncomeQuery.Grid_ToleranceAmt);
            col.Insert(28, "BankInfo", ResSaleIncomeQuery.Grid_BankInfo);

            soIncomeFacade.ExportExcelFile(lastQueryVM, new ColumnSet[] { col });
        }
Exemplo n.º 4
0
        private void dgVendorByGroupQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            m_queryRequest.PagingInfo = new PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };

            FinancialFacade facade = new FinancialFacade(this);

            ColumnSet col = new ColumnSet(dgVendorByGroupQueryResult);

            col.Insert(10, "R4", "未扣减的EIMS-票扣", 20);
            col.Insert(11, "R2", "未扣减的EIMS-帐扣", 20);
            col.Insert(12, "R0", "未扣减的EIMS-PO单扣减", 20);
            col.Insert(13, "R3", "未扣减的EIMS-代销结算单扣减", 20);

            facade.ExportFinanceVendorByGroup(m_queryRequest, new ColumnSet[] { col });
        }
Exemplo n.º 5
0
        private void DataGrid_ExportAllClick(object sender, EventArgs e)
        {
            if (_lastQueryVM == null || this.DataGrid.TotalCount <= 0)
            {
                Window.Alert(ResCommon.Message_NoData2Export);
                return;
            }
            ColumnSet col = new ColumnSet(this.DataGrid);

            col.Insert(2, "InvoiceType", "发票类型");
            _facade.ExportAllInvoiceExcelFile(_lastQueryVM, new ColumnSet[] { col });
        }
Exemplo n.º 6
0
        //按查询条件导出数据到Excel
        private void QueryResultGrid_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.SO_ExcelExport))
            {
                Window.Alert(ResSO.Msg_Error_Right, MessageType.Error);
                return;
            }

            m_queryRequest.PagingInfo = new PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };
            SOQueryFacade facade = new SOQueryFacade(this);
            ColumnSet     col    = new ColumnSet(QueryResultGrid);

            col.Insert(0, "CSConfirmComplainType", ResSO.DataGrid_CSConfirmComplainType);
            col.Insert(1, "CSConfirmComplainTypeDetail", ResSO.DataGrid_CSConfirmComplainTypeDetail);

            facade.ExportComplain(m_queryRequest, new ColumnSet[] { col });
        }
Exemplo n.º 7
0
        /// <summary>
        /// 导出付款单列表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgPayItemQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (lastQueryVM == null || this.dgPayItemQueryResult.TotalCount <= 0)
            {
                Window.Alert(ResCommon.Message_NoData2Export);
                return;
            }
            ColumnSet col = new ColumnSet(this.dgPayItemQueryResult);

            col.Insert(15, "InvoiceUpdate", ResPayItemQuery.Grid_InvoiceUpdate);
            col.SetFormat("EstimatePayTime", ConstValue.Invoice_ShortTimeFormat);
            facade.ExportExcelFile(lastQueryVM, new ColumnSet[] { col });
        }
Exemplo n.º 8
0
        private void ProductShowResult_ExportAllClick(object sender, EventArgs e)
        {
            ProductShowFacade facade = new ProductShowFacade();
            ColumnSet         col    = new ColumnSet();

            col.Insert(0, "ProductID", "产品号");
            col.Insert(1, "ProductTitle", "产品描述");
            col.Insert(2, "Category1Name", "产品一级类");
            col.Insert(3, "Category2Name", "产品二级类");
            col.Insert(4, "Category3Name", "产品三级类");
            col.Insert(5, "FirstOnlineTime", "上架时间");
            col.Insert(6, "EditDate", "更新时间");
            col.Insert(7, "Status", "状态");
            facade.ExprotExecl(model, new ColumnSet[] { col });
        }
Exemplo n.º 9
0
        private void DataGrid_QueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (lastQueryVM == null || this.DataGrid_QueryResult.TotalCount <= 0)
            {
                Window.Alert(ResCommon.Message_NoData2Export);
                return;
            }

            ColumnSet col = new ColumnSet(this.DataGrid_QueryResult);

            col.Remove("SapImportedStatusDesc");
            col.Insert(2, "Status", ResInvoiceInputQuery.Grid_Status, 10)
            .SetWidth("VendorName", 40);

            facade.ExportExcelFile(lastQueryVM, new ColumnSet[] { col });
        }
Exemplo n.º 10
0
        /// <summary>
        /// 导出报表数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.EIMS_AccruedByPM_Export))
            {
                Window.Alert(ResEIMSAccrued.Msg_HasNoRight);
                return;
            }
            if (dgQueryResult.ItemsSource != null)
            {
                m_queryRequest.PagingInfo = new PagingInfo()
                {
                    PageSize  = ConstValue.MaxRowCountLimit,
                    PageIndex = 0,
                    SortBy    = string.Empty
                };

                AccruedReportFacade facade = new AccruedReportFacade(this);

                ColumnSet col = new ColumnSet(dgQueryResult);

                col.Insert(3, "curAccruedAmount", "当期返利_应计金额", 20);
                col.Insert(4, "AccruedAmountTax", "当期返利_税金", 20);
                col.Insert(5, "AccruedAmount", "当期返利_总额", 20);

                col.Insert(6, "ReceivedPO", "已收返利金额(含税金额)_PO单扣减", 20);
                col.Insert(7, "ReceivedConsign", "已收返利金额(含税金额)_代销结算单扣减", 20);
                col.Insert(8, "ReceivedCash", "已收返利金额(含税金额)_现金", 20);
                col.Insert(9, "ReceivedAcctDeduct", "已收返利金额(含税金额)_帐扣", 20);
                col.Insert(10, "ReceivedVoteBuckle", "已收返利金额(含税金额)_票扣", 20);
                col.Insert(11, "ReceivedAmount", "已收返利金额(含税金额)_总计", 20);

                facade.ExportAccruedByPM(m_queryRequest, new ColumnSet[] { col });
            }
            else
            {
                Window.Alert(ResEIMSAccrued.Msg_PleaseQueryData);
                return;
            }
        }
Exemplo n.º 11
0
        private void dataGridSo_ExportAllClick(object sender, EventArgs e)
        {
            if (this.dataGridSo.ItemsSource == null || this.dataGridSo.TotalCount == 0)
            {
                Window.Alert(ResCustomerCalingQuery.Msg_NoData);
                return;
            }
            InitExportFilter();
            ColumnSet col = new ColumnSet(this.dataGridSo);

            col.Insert(0, "SOID", ResCustomerCalingQuery.Grid_So_SoSysNo, 15);
            col.SetWidth("CustomerID", 20);
            col.SetWidth("IsFPSO", 15);
            col.SetWidth("TotalAmount", 15);
            col.SetWidth("UpdatedMan", 20);
            facade.ExportSOList(filter, new ColumnSet[] { col });
        }
Exemplo n.º 12
0
        /// <summary>
        /// 导出所有数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.EIMS_Comprehensive_Export))
            {
                Window.Alert(ResEIMSComprehensive.Msg_HasNoRight);
                return;
            }
            if (dgQueryResult.ItemsSource == null)
            {
                Window.Alert(ResEIMSComprehensive.Msg_PleaseQueryData);
                return;
            }
            m_queryRequest.PagingInfo = new PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };

            ComprehensiveReportFacade facade = new ComprehensiveReportFacade(this);

            ColumnSet col = new ColumnSet(dgQueryResult);

            col.Insert(9, "BeginBalanceAccrued", "期初余额_应计金额", 20);
            col.Insert(10, "BeginBalanceTax", "期初余额_税金", 20);
            col.Insert(11, "BeginBalance", "期初余额_总额", 20);

            col.Insert(12, "EndBalanceAccrued", "期末余额_应计金额", 20);
            col.Insert(13, "EndBalanceTax", "期末余额_税金", 20);
            col.Insert(14, "EndBalance", "期末余额_总额", 20);

            col.Insert(20, "InvoiceAmountAccrued", "单据金额_应计金额", 20);
            col.Insert(21, "InvoiceAmountTax", "单据金额_税金", 20);
            col.Insert(22, "InvoiceAmount", "单据金额_总额", 20);

            facade.ExportComprehensive(m_queryRequest, new ColumnSet[] { col });
        }
Exemplo n.º 13
0
        private void DataGrid_RMAItem_ResultList_ExportAllClick(object sender, EventArgs e)
        {
            if (lastQueryVM == null || this.DataGrid_RMAItem_ResultList.TotalCount < 1)
            {
                Window.Alert(ResRMAReports.Msg_ExportError);
                return;
            }
            if (this.DataGrid_RMAItem_ResultList.TotalCount > 10000)
            {
                Window.Alert(ResRMAReports.Msg_ExportExceedsLimitCount);
                return;
            }

            ColumnSet col = new ColumnSet(this.DataGrid_RMAItem_ResultList);

            col.Insert(0, "SysNo", ResRMAReports.Excel_RegisterSysNo, 12)
            .SetWidth("ProductID", 15)
            .SetWidth("ProductName", 48);
            facade.ExportRMAItemExcelFile(lastQueryVM, new ColumnSet[] { col });
        }
        private void btnExcelOutput_Click(object sender, RoutedEventArgs e)
        {
            ColumnSet col = new ColumnSet();

            col.Insert(0, "CategoryInfo.CategoryName.Content", "类别", 15)
            .Insert(1, "Manufacturer.ManufacturerNameLocal.Content", "生产商", 15)
            .Insert(2, "Brand.BrandNameLocal.Content", "品牌", 20)
            .Insert(3, "ProductGroupMode", "型号系列", 25)
            .Insert(4, "ProductName", "商品名称", 25)
            .Insert(5, "ProductModel", "具体型号", 25)
            .Insert(6, "SellerName", "供应商", 25)
            .Insert(7, "PMUser.UserDisplayName", "PM", 25)
            .Insert(8, "SellerSite", "厂商链接", 25)
            .Insert(9, "VirtualPrice", "泰隆优选供价", 25)
            .Insert(10, "CurrentPrice", "泰隆优选售价", 25)
            .Insert(11, "Margin", "毛利率(不含优惠券赠品)", 25)
            .Insert(12, "BasicPrice", "线下市场价", 25)
            .Insert(13, "IsConsign", "代销属性", 25)
            .Insert(14, "IsTakePictures", "是否拍照", 25)
            .Insert(15, "Keywords", "搜索关键字", 25)
            .Insert(16, "Weight", "重量(单位:g)", 25)
            .Insert(17, "Length", "包装尺寸(长度,单位:mm)", 25)
            .Insert(18, "Width", "包装尺寸(宽度,单位:mm)", 25)
            .Insert(19, "PackageList", "包装清单", 25)
            .Insert(20, "HostWarrantyDay", "主件保修期(天)", 25)
            .Insert(21, "PartWarrantyDay", "附件保修期(天)", 25)
            .Insert(22, "Warranty", "保修细则", 25)
            .Insert(23, "ServicePhone", "厂商售后电话", 25)
            .Insert(24, "MinPackNumber", "最小包装数量", 25)
            .Insert(25, "Note", "备注", 25);


            model = (SellerProductRequestQueryVM)this.DataContext;
            var facade = new SellerProductRequestQueryFacade(this);

            facade.ExportSellerProductRequestExcelFile(model, new ColumnSet[] { col });
        }
Exemplo n.º 15
0
        private void QueryResultGrid_ExportAllClick(object sender, EventArgs e)
        {
            //权限控制:
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.PO_VendorRefund_Export))
            {
                Window.Alert("对不起,你没有权限进行此操作!");
                return;
            }
            //导出全部:
            if (null != queryFilter)
            {
                VendorRMARefundQueryFilter exportQueryRequest = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone <VendorRMARefundQueryFilter>(queryFilter);
                exportQueryRequest.PageInfo = new QueryFilter.Common.PagingInfo()
                {
                    PageIndex = 0, PageSize = ConstValue.MaxRowCountLimit
                };

                foreach (DataGridColumn col in QueryResultGrid.Columns)
                {
                    if (col.Visibility == Visibility.Collapsed)
                    {
                        if (col is Newegg.Oversea.Silverlight.Controls.Data.DataGridTextColumn)
                        {
                            (col as Newegg.Oversea.Silverlight.Controls.Data.DataGridTextColumn).NeedExport = false;
                        }
                        else if (col is Newegg.Oversea.Silverlight.Controls.Data.DataGridTemplateColumn)
                        {
                            (col as Newegg.Oversea.Silverlight.Controls.Data.DataGridTemplateColumn).NeedExport = false;
                        }
                    }
                }
                ColumnSet columnSet = new ColumnSet(QueryResultGrid);
                columnSet.Insert(1, "Status", ResVendorRMARefundQuery.GridHeader_Status);

                serviceFacade.ExportExcelForVendorRMARefundList(exportQueryRequest, new ColumnSet[] { columnSet });
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// 导出
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnExcelExporter_Click(object sender, RoutedEventArgs e)
        {
            dynamic   d           = this.ProductAccessoriesResult.SelectedItem as dynamic;
            bool      IsTreeQuery = d.IsTreeQuery == "Y";
            ColumnSet col         = new ColumnSet();
            List <ProductAccessoriesQueryConditionVM> ConditionList = new List <ProductAccessoriesQueryConditionVM>();

            //根据SysNo得到所有条件,动态生成列名
            facade.GetAccessoriesQueryConditionBySysNo((int)d.SysNo, (obj, arg) =>
            {
                if (arg.FaultsHandle())
                {
                    return;
                }
                foreach (var item in arg.Result.Rows)
                {
                    ConditionList.Add(new ProductAccessoriesQueryConditionVM()
                    {
                        Condition = new AccessoriesQueryCondition()
                        {
                            ConditionName = item.ConditionName, Priority = (PriorityType)item.Level, SysNo = item.SysNo
                        },
                        ParentCondition = new AccessoriesQueryCondition()
                        {
                            ConditionName = item.ParentConditionName, SysNo = item.ParentSysNo
                        },
                        Priority = (PriorityType)item.Level
                    });
                }
                int index = 0;
                if (IsTreeQuery)
                {
                    foreach (var item in ConditionList)
                    {
                        string title = item.Condition.ConditionName + "编号";
                        if (index == 0)
                        {
                            col.Insert(0, "FirstSysNo", title, 15);
                            col.Insert(1, "FirstValue", item.Condition.ConditionName, 25);
                        }
                        if (index == 1)
                        {
                            col.Insert(2, "SecondSysNo", title, 15);
                            col.Insert(3, "SecondValue", item.Condition.ConditionName, 25);
                        }
                        if (index == 2)
                        {
                            col.Insert(4, "ThirdSysNo", title, 15);
                            col.Insert(5, "ThirdValue", item.Condition.ConditionName, 25);
                        }
                        if (index == 3)
                        {
                            col.Insert(6, "FourthSysNo", title, 15);
                            col.Insert(7, "FourthValue", item.Condition.ConditionName, 25);
                        }
                        index = index + 1;
                    }
                }
                else
                {
                    col.Insert(0, "ConditionSysNo", "条件编号");
                    col.Insert(1, "ConditionName", "条件");
                    col.Insert(2, "ConditionValueSysNo", "选项值编号");
                    col.Insert(3, "ConditionValue", "选项值");
                    col.Insert(4, "Producut", "商品");
                }
                if (ConditionList.Count > 0 && IsTreeQuery)
                {
                    col.Insert(ConditionList.Count * 2, "Producut", "商品");
                }
                facade.GetAccessoriesQueryExcelOutput((int)d.SysNo, (string)d.IsTreeQuery, new ColumnSet[] { col });
            });
        }
Exemplo n.º 17
0
        /// <summary>
        /// 导出报表数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgQueryResult_ExportAllClick(object sender, EventArgs e)
        {
            if (!AuthMgr.HasFunctionPoint(AuthKeyConst.EIMS_ReceiveByYear_Export))
            {
                Window.Alert(ResEIMSReceiveReport.Msg_HasNoRight);
                return;
            }
            if (dgQueryResult.ItemsSource == null)
            {
                Window.Alert(ResEIMSReceiveReport.Msg_PleaseQueryData);
                return;
            }
            m_queryRequest.PagingInfo = new PagingInfo()
            {
                PageSize  = ConstValue.MaxRowCountLimit,
                PageIndex = 0,
                SortBy    = string.Empty
            };

            ReceivedReportFacade facade = new ReceivedReportFacade(this);

            ColumnSet col = new ColumnSet();

            col.Insert(0, "VendorNumber", "供应商编号", 10);
            col.Insert(1, "VendorName", "供应商名称", 25);
            col.Insert(2, "TotalReceiveAmount", "总收款金额", 25);

            col.Insert(3, "RAJanuary", "1月", 10);
            col.Insert(4, "RAFebruary", "2月", 10);
            col.Insert(5, "RAMarch", "3月", 10);
            col.Insert(6, "RAApril", "4月", 10);
            col.Insert(7, "RAMay", "5月", 10);
            col.Insert(8, "RAJune", "6月", 10);
            col.Insert(9, "RAJuly", "7月", 10);
            col.Insert(10, "RAAugust", "8月", 10);
            col.Insert(11, "RASeptember", "9月", 10);
            col.Insert(12, "RAOctober", "10月", 10);
            col.Insert(13, "RANovember", "11月", 10);
            col.Insert(14, "RADecember", "12月", 10);

            facade.ExportReceiveByYear(m_queryRequest, new ColumnSet[] { col });
        }