/// <summary> /// 查询数据集 /// </summary> /// <param name="entity"></param> /// <param name="list"></param> /// <returns></returns> public DataSet GetDataSource(ReportsEntity entity, List <ReportParamsEntity> list, int orderType, string orderNum) { DataSet ds = null; if (entity.ReportType == (int)EReportType.Report) { ds = this.Reports.GetDataSource(entity, list); } else { if (orderType == (int)EReportType.InBill) { Bill <InStorageEntity, InStorDetailEntity> bill = new InStorageOrder(this.CompanyID); ds = bill.GetPrint(orderNum); } else if (orderType == (int)EReportType.OutBill) { Bill <OutStorageEntity, OutStoDetailEntity> bill = new OutStorageOrder(this.CompanyID); ds = bill.GetPrint(orderNum); } else if (orderType == (int)EReportType.User) { AdminProvider provider = new AdminProvider(this.CompanyID); ds = provider.GetPrint(orderNum); } } if (ds != null) { foreach (DataTable table in ds.Tables) { if (table.Rows.Count == 0) { DataRow row = table.NewRow(); table.Rows.Add(row); } } } return(ds); }