| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  | using System.IO; | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Text; | 
					
						
							|  |  |  |  | using System.Web; | 
					
						
							|  |  |  |  | using System.Web.UI; | 
					
						
							|  |  |  |  | using System.Web.UI.WebControls; | 
					
						
							|  |  |  |  | using BLL; | 
					
						
							|  |  |  |  | using AspNet = System.Web.UI.WebControls; | 
					
						
							|  |  |  |  | namespace FineUIPro.Web.CQMS.ManageReport | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     public partial class NCRStatisc : PageBase | 
					
						
							|  |  |  |  |     { | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |         private static List<Model.NCRStatisc> StatisticsList = new List<Model.NCRStatisc>(); | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         protected void Page_Load(object sender, EventArgs e) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-11-18 17:44:22 +08:00
										 |  |  |  |             if (!IsPostBack) | 
					
						
							|  |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                 Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); | 
					
						
							|  |  |  |  |                 this.txtStartDate.Text = "2015-01-01"; | 
					
						
							|  |  |  |  |                 this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); | 
					
						
							|  |  |  |  |                 if (project != null) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     if (project.StartDate != null) | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.StartDate); | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 BindStatisc(); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         protected void btnSearch_Click(object sender, EventArgs e) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 Alert.ShowInTop("开始和结束日期不能为空!", MessageBoxIcon.Warning); | 
					
						
							|  |  |  |  |                 return; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             if (Convert.ToDateTime(this.txtStartDate.Text.Trim()) >= Convert.ToDateTime(this.txtEndDate.Text.Trim())) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 Alert.ShowInTop("开始日期不能大于结束日期!", MessageBoxIcon.Warning); | 
					
						
							|  |  |  |  |                 return; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             BindStatisc(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         #region 绑定GridView | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 绑定 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="cNProfessionalId"></param> | 
					
						
							|  |  |  |  |         public void BindStatisc() | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); | 
					
						
							|  |  |  |  |             DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); | 
					
						
							|  |  |  |  |             //DateTime projectStartDate = Convert.ToDateTime("2015-01-01"); | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |             //List<Model.NCRStatisc> StatisticsList = new List<Model.NCRStatisc>(); | 
					
						
							|  |  |  |  |             StatisticsList = new List<Model.NCRStatisc>(); | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |             //Model.Base_Project project = BLL.ProjectService.getProjectByProjectId(this.CurrUser.LoginProjectId); | 
					
						
							|  |  |  |  |             //if (project != null) | 
					
						
							|  |  |  |  |             //{ | 
					
						
							|  |  |  |  |             //    if (project.StartDate != null) | 
					
						
							|  |  |  |  |             //    { | 
					
						
							|  |  |  |  |             //        projectStartDate = Convert.ToDateTime(project.StartDate); | 
					
						
							|  |  |  |  |             //    } | 
					
						
							|  |  |  |  |             //} | 
					
						
							|  |  |  |  |             int i = 1; | 
					
						
							|  |  |  |  |             if (this.ckType.SelectedValue == "1")  //按单位 | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 //所有集合 | 
					
						
							|  |  |  |  |                 List<Model.Comprehensive_NCRManagement> totalManagementList = BLL.NCRManagementService.GetNCRManagementListByDate(this.CurrUser.LoginProjectId, startDate, endDate); | 
					
						
							|  |  |  |  |                 List<string> unitNames = (from x in totalManagementList select x.ReceiveUnit).Distinct().ToList(); | 
					
						
							|  |  |  |  |                 foreach (var item in unitNames) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     //当期集合 | 
					
						
							|  |  |  |  |                     List<Model.Comprehensive_NCRManagement> managementList = BLL.NCRManagementService.GetNCRManagementListByUnitNameAndDate(this.CurrUser.LoginProjectId, item, startDate, endDate); | 
					
						
							|  |  |  |  |                     Model.NCRStatisc NCRStatisc = new Model.NCRStatisc(); | 
					
						
							|  |  |  |  |                     NCRStatisc.Num = i; | 
					
						
							|  |  |  |  |                     NCRStatisc.WorkName = BLL.UnitService.getUnitNamesUnitIds(item); | 
					
						
							|  |  |  |  |                     NCRStatisc.CheckNum = managementList.Count(); | 
					
						
							| 
									
										
										
										
											2023-10-12 19:33:22 +08:00
										 |  |  |  |                     NCRStatisc.OKNum = managementList.Count(x => x.Status == "3"); | 
					
						
							|  |  |  |  |                     NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3"); | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                     NCRStatisc.Remark = ""; | 
					
						
							|  |  |  |  |                     if (NCRStatisc.CheckNum != 0)//被除数不能为零 | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入 | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                     else | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         NCRStatisc.OKRate = "0%"; | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                     StatisticsList.Add(NCRStatisc); | 
					
						
							|  |  |  |  |                     i++; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else   //按专业 | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != Const.CNProfessionalConstructId orderby x.SortIndex select x; | 
					
						
							|  |  |  |  |                 foreach (var item in cNProfessionals) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     //所有集合 | 
					
						
							|  |  |  |  |                     List<Model.Comprehensive_NCRManagement> managementList = BLL.NCRManagementService.GetNCRManagementListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, item.CNProfessionalId, startDate, endDate); | 
					
						
							|  |  |  |  |                     Model.NCRStatisc NCRStatisc = new Model.NCRStatisc(); | 
					
						
							|  |  |  |  |                     NCRStatisc.Num = i; | 
					
						
							|  |  |  |  |                     NCRStatisc.WorkName = item.ProfessionalName; | 
					
						
							|  |  |  |  |                     NCRStatisc.CheckNum = managementList.Count(); | 
					
						
							| 
									
										
										
										
											2024-11-18 17:44:22 +08:00
										 |  |  |  |                     //NCRStatisc.OKNum = managementList.Count(x => x.Status == "3"); | 
					
						
							|  |  |  |  |                     //NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3"); | 
					
						
							| 
									
										
										
										
											2025-07-23 11:10:19 +08:00
										 |  |  |  |                     //int okNum = managementList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count(); | 
					
						
							|  |  |  |  |                     int okNum = managementList.Where(x => x.ImplementationFrontState == "已闭合").Count(); | 
					
						
							| 
									
										
										
										
											2024-11-18 17:44:22 +08:00
										 |  |  |  |                     NCRStatisc.OKNum = okNum; | 
					
						
							|  |  |  |  |                     NCRStatisc.NotOKNum = managementList.Count() - okNum; | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |                     NCRStatisc.Remark = ""; | 
					
						
							|  |  |  |  |                     if (NCRStatisc.CheckNum != 0)//被除数不能为零 | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入 | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                     else | 
					
						
							|  |  |  |  |                     { | 
					
						
							|  |  |  |  |                         NCRStatisc.OKRate = "0%"; | 
					
						
							|  |  |  |  |                     } | 
					
						
							|  |  |  |  |                     StatisticsList.Add(NCRStatisc); | 
					
						
							|  |  |  |  |                     i++; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             if (StatisticsList.Count() > 0)   //增加总计 | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 Model.NCRStatisc StatisticsLast = new Model.NCRStatisc(); | 
					
						
							|  |  |  |  |                 StatisticsLast.Num = StatisticsList.Count() + 1; | 
					
						
							|  |  |  |  |                 StatisticsLast.WorkName = "合计"; | 
					
						
							|  |  |  |  |                 StatisticsLast.Remark = ""; | 
					
						
							|  |  |  |  |                 foreach (Model.NCRStatisc item in StatisticsList) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     StatisticsLast.CheckNum += item.CheckNum; | 
					
						
							|  |  |  |  |                     StatisticsLast.OKNum += item.OKNum; | 
					
						
							|  |  |  |  |                     StatisticsLast.NotOKNum += item.NotOKNum; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 if (StatisticsLast.CheckNum != 0)//被除数不能为零 | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     StatisticsLast.OKRate = Math.Round((double)StatisticsLast.OKNum / (double)StatisticsLast.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入 | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 else | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     StatisticsLast.OKRate = "0%"; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 StatisticsList.Add(StatisticsLast); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             this.Grid1.DataSource = StatisticsList; | 
					
						
							|  |  |  |  |             this.Grid1.DataBind(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         #endregion | 
					
						
							|  |  |  |  |         protected void ckType_SelectedIndexChanged(object sender, EventArgs e) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             if (this.ckType.SelectedValue == "1") | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 this.Grid1.Columns[1].HeaderText = "接收单位"; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 this.Grid1.Columns[1].HeaderText = "专业"; | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             BindStatisc(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             BindStatisc(); | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  |         #region 导出按钮 | 
					
						
							|  |  |  |  |         /// 导出按钮 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="sender"></param> | 
					
						
							|  |  |  |  |         /// <param name="e"></param> | 
					
						
							|  |  |  |  |         protected void btnOut_Click(object sender, EventArgs e) | 
					
						
							|  |  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |             string rootPath = Server.MapPath("~/"); | 
					
						
							|  |  |  |  |             string initTemplatePath = Const.NCRStatiscTemlUrl; | 
					
						
							|  |  |  |  |             string uploadfilepath = string.Empty; | 
					
						
							|  |  |  |  |             string newUrl = string.Empty; | 
					
						
							|  |  |  |  |             uploadfilepath = rootPath + initTemplatePath; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |             if (StatisticsList != null) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId); | 
					
						
							|  |  |  |  |                 newUrl = uploadfilepath.Replace("NCR统计模板", "NCR统计(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); | 
					
						
							| 
									
										
										
										
											2025-01-23 16:11:00 +08:00
										 |  |  |  |                 if (File.Exists(newUrl)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     File.Delete(newUrl); | 
					
						
							|  |  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |                 File.Copy(uploadfilepath, newUrl); | 
					
						
							|  |  |  |  |                 // 第一步:读取文件流 | 
					
						
							|  |  |  |  |                 NPOI.SS.UserModel.IWorkbook workbook; | 
					
						
							|  |  |  |  |                 using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); | 
					
						
							|  |  |  |  |                     workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 // 创建单元格样式 | 
					
						
							|  |  |  |  |                 NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); | 
					
						
							|  |  |  |  |                 cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; | 
					
						
							|  |  |  |  |                 cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; | 
					
						
							|  |  |  |  |                 cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; | 
					
						
							|  |  |  |  |                 cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; | 
					
						
							|  |  |  |  |                 cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; | 
					
						
							|  |  |  |  |                 cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; | 
					
						
							| 
									
										
										
										
											2024-05-08 21:51:39 +08:00
										 |  |  |  |                 cellStyle.WrapText = true;//自动换行 | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |                 var font = workbook.CreateFont(); | 
					
						
							|  |  |  |  |                 font.FontHeightInPoints = 11; | 
					
						
							|  |  |  |  |                 cellStyle.SetFont(font); | 
					
						
							|  |  |  |  |                 // 第二步:创建新数据行 | 
					
						
							|  |  |  |  |                 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); | 
					
						
							|  |  |  |  |                 NPOI.SS.UserModel.IRow row = sheet.GetRow(0); | 
					
						
							|  |  |  |  |                 NPOI.SS.UserModel.ICell cell; | 
					
						
							|  |  |  |  |                 int i = 2; | 
					
						
							|  |  |  |  |                 foreach (var item in StatisticsList) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     // 第二步:创建新数据行 | 
					
						
							|  |  |  |  |                     row = sheet.CreateRow(i); | 
					
						
							|  |  |  |  |                     // 添加数据 | 
					
						
							|  |  |  |  |                     cell = row.CreateCell(0); | 
					
						
							|  |  |  |  |                     cell.CellStyle = cellStyle; | 
					
						
							|  |  |  |  |                     cell.SetCellValue(item.WorkName);//工作名称 | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     cell = row.CreateCell(1); | 
					
						
							|  |  |  |  |                     cell.CellStyle = cellStyle; | 
					
						
							|  |  |  |  |                     cell.SetCellValue(item.CheckNum); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     cell = row.CreateCell(2); | 
					
						
							|  |  |  |  |                     cell.CellStyle = cellStyle; | 
					
						
							|  |  |  |  |                     cell.SetCellValue(item.OKNum); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     cell = row.CreateCell(3); | 
					
						
							|  |  |  |  |                     cell.CellStyle = cellStyle; | 
					
						
							|  |  |  |  |                     cell.SetCellValue(item.NotOKNum); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     cell = row.CreateCell(4); | 
					
						
							|  |  |  |  |                     cell.CellStyle = cellStyle; | 
					
						
							|  |  |  |  |                     cell.SetCellValue(item.OKRate); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                     cell = row.CreateCell(5); | 
					
						
							|  |  |  |  |                     cell.CellStyle = cellStyle; | 
					
						
							|  |  |  |  |                     cell.SetCellValue(item.Remark); | 
					
						
							|  |  |  |  |                     i++; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 // 第三步:写入文件流 | 
					
						
							|  |  |  |  |                 using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     workbook.Write(stream); | 
					
						
							|  |  |  |  |                     workbook.Close(); | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 string fileName = Path.GetFileName(newUrl); | 
					
						
							|  |  |  |  |                 FileInfo info = new FileInfo(newUrl); | 
					
						
							|  |  |  |  |                 long fileSize = info.Length; | 
					
						
							|  |  |  |  |                 Response.Clear(); | 
					
						
							|  |  |  |  |                 Response.ContentType = "application/x-zip-compressed"; | 
					
						
							|  |  |  |  |                 Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); | 
					
						
							|  |  |  |  |                 Response.AddHeader("Content-Length", fileSize.ToString()); | 
					
						
							|  |  |  |  |                 Response.TransmitFile(newUrl, 0, fileSize); | 
					
						
							|  |  |  |  |                 Response.Flush(); | 
					
						
							|  |  |  |  |                 Response.Close(); | 
					
						
							|  |  |  |  |                 File.Delete(newUrl); | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |             else | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  |                 Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning); | 
					
						
							|  |  |  |  |             } | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 导出方法 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="grid"></param> | 
					
						
							|  |  |  |  |         /// <returns></returns> | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |         //private string GetGridTableHtml(Grid grid) | 
					
						
							|  |  |  |  |         //{ | 
					
						
							|  |  |  |  |         //    StringBuilder sb = new StringBuilder(); | 
					
						
							|  |  |  |  |         //    sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>"); | 
					
						
							|  |  |  |  |         //    sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">"); | 
					
						
							|  |  |  |  |         //    sb.Append("<tr>"); | 
					
						
							|  |  |  |  |         //    grid.PageSize = 10000; | 
					
						
							|  |  |  |  |         //    BindStatisc(); | 
					
						
							|  |  |  |  |         //    foreach (GridColumn column in grid.Columns) | 
					
						
							|  |  |  |  |         //    { | 
					
						
							|  |  |  |  |         //        sb.AppendFormat("<td>{0}</td>", column.HeaderText); | 
					
						
							|  |  |  |  |         //    } | 
					
						
							|  |  |  |  |         //    sb.Append("</tr>"); | 
					
						
							|  |  |  |  |         //    foreach (GridRow row in grid.Rows) | 
					
						
							|  |  |  |  |         //    { | 
					
						
							|  |  |  |  |         //        sb.Append("<tr>"); | 
					
						
							|  |  |  |  |         //        foreach (GridColumn column in grid.Columns) | 
					
						
							|  |  |  |  |         //        { | 
					
						
							|  |  |  |  |         //            string html = row.Values[column.ColumnIndex].ToString(); | 
					
						
							|  |  |  |  |         //            if (column.ColumnID == "tfNumber") | 
					
						
							|  |  |  |  |         //            { | 
					
						
							|  |  |  |  |         //                html = (row.FindControl("labNumber") as AspNet.Label).Text; | 
					
						
							|  |  |  |  |         //            } | 
					
						
							|  |  |  |  |         //            sb.AppendFormat("<td>{0}</td>", html); | 
					
						
							|  |  |  |  |         //        } | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |         //        sb.Append("</tr>"); | 
					
						
							|  |  |  |  |         //    } | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |         //    sb.Append("</table>"); | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-05 17:08:38 +08:00
										 |  |  |  |         //    return sb.ToString(); | 
					
						
							|  |  |  |  |         //} | 
					
						
							| 
									
										
										
										
											2021-04-30 10:28:37 +08:00
										 |  |  |  |         #endregion | 
					
						
							|  |  |  |  |     } | 
					
						
							|  |  |  |  | } |