public ActionResult Export(CustomerPageQueryModel query)
        {
            var customers  = _customerSearchService.GetCustomers(query);
            var properties = _customerPropertyService.SearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <CustomerModel, CustomerPropertyModel>
            {
                Datas   = customers,
                Columns = properties
            };
            var datas    = _dataExporter.Export <CustomerModel, CustomerPropertyModel>(model);
            var fileName = _dataExporter.CreateFileName("客户");

            return(File(datas, "application/ms-excel", fileName));
        }
Beispiel #2
0
        public ActionResult Export(EmployeePageQueryModel query)
        {
            var Employee   = _employeeSearchService.GetEmployee(query);
            var properties = _employeePropertyService.SearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <EmployeeModel, EmployeePropertyModel>
            {
                Datas   = Employee,
                Columns = properties
            };
            var fileName = _dataExporter.CreateFileName("员工记录");
            var datas    = _dataExporter.Export <EmployeeModel, EmployeePropertyModel>(model);

            return(File(datas, "application/ms-excel", fileName));
        }
Beispiel #3
0
        public ActionResult Export(AttendancePageQueryModel query)
        {
            var Attendance = _attendanceSearchService.GetAttendance(query);
            var properties = _attendancePropertyService.SearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <AttendanceModel, AttendancePropertyModel>
            {
                Datas   = Attendance,
                Columns = properties
            };
            var fileName = _dataExporter.CreateFileName("员工记录");
            var datas    = _dataExporter.Export <AttendanceModel, AttendancePropertyModel>(model);

            return(File(datas, "application/ms-excel", fileName));
        }
        public ActionResult Export(GoodsPageQueryModel query)
        {
            var goods      = _goodsSearchService.GetGoods(query);
            var properties = _goodsPropertyService.SearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <GoodsModel, GoodsPropertyModel>
            {
                Datas   = goods,
                Columns = properties
            };
            var fileName = _dataExporter.CreateFileName("商品");
            var datas    = _dataExporter.Export <GoodsModel, GoodsPropertyModel>(model);

            return(File(datas, "application/ms-excel", fileName));
        }
Beispiel #5
0
        public ActionResult Export(StockPageQueryModel query)
        {
            var stock      = _stockSearchService.GetStock(query);
            var properties = _stockPropertyService.SearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <StockModel, StockPropertyModel>
            {
                Datas   = stock,
                Columns = properties
            };

            _stockWrappers.ToList().ForEach(wrapper =>
            {
                wrapper.Wrapper(stock);
            });
            var fileName = _dataExporter.CreateFileName("库存记录");
            var datas    = _dataExporter.Export <StockModel, StockPropertyModel>(model);

            return(File(datas, "application/ms-excel", fileName));
        }
        public ActionResult Export(PurchasePageQueryModel query)
        {
            var purchase   = _purchaseSearchService.GetPurchase(query);
            var properties = _purchasePropertyService.SearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <PurchaseModel, PurchasePropertyModel>
            {
                Datas   = purchase,
                Columns = properties
            };

            _purchaseWrappers.ToList().ForEach(wrapper =>
            {
                wrapper.Wrapper(purchase);
            });
            var fileName = _dataExporter.CreateFileName("采购单");
            var datas    = _dataExporter.Export <PurchaseModel, PurchasePropertyModel>(model);

            return(File(datas, "application/ms-excel", fileName));
        }
        public ActionResult Export(CustomerFinancePageQueryModel query)
        {
            var customerFinances = _financeSearchService.GetCustomerFinances(query);

            _financeWrappers.ToList().ForEach(wraper =>
            {
                wraper.Wrapper(customerFinances);
            });
            var properties = _propertySearchService.GetColumns();
            var model      = new ExportDataHaveColumnModel <CustomerFinanceModel, CustomerFinancePropertyModel>
            {
                Datas   = customerFinances,
                Columns = properties
            };
            var fileName = _dataExporter.CreateFileName("客户财务");
            var datas    = _dataExporter.Export <CustomerFinanceModel, CustomerFinancePropertyModel>(model);

            return(File(datas, "application/ms-excel", fileName));
        }