protected void btnImport_Click(object sender, ImageClickEventArgs e) { ProductInfoModel model = new ProductInfoModel(); model.ProdNo = txt_ProdNo.Value; model.ProductName = txt_ProductName.Text; model.TypeID = txt_ID.Value; model.UsedStatus = UsedStatus.Value; model.PYShort = txt_PYShort.Value; model.Specification = txt_Specification.Value; model.BarCode = this.HiddenBarCode.Value; model.CheckStatus = CheckStatus.Value; model.CompanyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD; string EFIndex = HdselEFIndex.Value; string EFDesc = HdtxtEFDesc.Value; //string ProductDiyAttr2= int totalCount = 0; DataTable dt = ProductInfoBus.GetProductInfo(model, EFIndex, EFDesc, 1, 1000000, "ID desc", ref totalCount); //导出标题 string headerTitle = "物品编号|物品名称|拼音缩写|名称简称|条码|物品分类|基本单位|所属大类|" + "计量单位组|规格型号|采购计量单位|颜色|销售计量单位|品牌|库存计量单位|档次级别|" + "生产计量单位|尺寸|是否启用批次|ABC分类|成本核算计价方法|标准成本(元)|去税售价(元)|" + "销项税率(%)|含税售价(元)|零售价(元)|销售折扣率(%)|调拨单价(元)|去税进价(元)| 进项税率(%)|" + "含税进价(元)|是否计入库存|是否允许负库存|主放仓库|安全库存量|最低库存量|最高库存量|" + "物品来源分类|产地|图号|启用状态|批准文号|价格策略|技术参数|常见问题|替代品名称|" + "物品描述信息|厂家|材质|建档时间|建档人|审核状态|最后更新日期|" + "最后更新用户"; //string headerTitle = "建档日期|启用状态"; string[] header = headerTitle.Split('|'); //导出标题所对应的列字段名称 string columnFiled = "ProdNo|ProductName|PYShort|ShortNam|BarCode|TypeName|UnitName|BigType|" + "GroupUnitName|Specification|InUnitName|ColorName|SaleUnitName|BrandName|StockUnitName|GradeName|" + "MakeUnitName|Size|IsBatchNo|ABCType|CalcPriceWays|StandardCost|StandardSell|" + "TaxRate|SellTax|SellPrice|Discount|TransferPrice|TaxBuy|InTaxRate|" + "StandardBuy|StockIs|MinusIs|StorageName|SafeStockNum|MinStockNum|MaxStockNum|" + "Source|FromAddr|DrawingNum|UsedStatus|FileNo|PricePolicy|Params|Questions|ReplaceName|" + "Description|Manufacturer|MaterialName|CreateDate|EmployeeName|CheckStatus|ModifiedDate|" + "ModifiedUserID"; //string columnFiled = "CreateDate|strUsedStatus"; string[] field = columnFiled.Split('|'); XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "物品档案列表"); }