| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  | using BLL; | 
					
						
							|  |  |  |  | using System; | 
					
						
							|  |  |  |  | using System.Collections.Generic; | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  | using System.Configuration; | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  | using System.Linq; | 
					
						
							|  |  |  |  | using System.Web.UI.WebControls; | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  | namespace FineUIPro.Web.HSSE.Check | 
					
						
							|  |  |  |  | { | 
					
						
							|  |  |  |  |     public partial class CheckSpecialView : PageBase | 
					
						
							|  |  |  |  |     { | 
					
						
							|  |  |  |  |         #region 定义变量 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 主键 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |         public string InspectionItemId | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |         { | 
					
						
							|  |  |  |  |             get | 
					
						
							|  |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                 return (string)ViewState["InspectionItemId"]; | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |             set | 
					
						
							|  |  |  |  |             { | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                 ViewState["InspectionItemId"] = value; | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         #endregion | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |         #region 加载页面 | 
					
						
							|  |  |  |  |         /// <summary> | 
					
						
							|  |  |  |  |         /// 加载页面 | 
					
						
							|  |  |  |  |         /// </summary> | 
					
						
							|  |  |  |  |         /// <param name="sender"></param> | 
					
						
							|  |  |  |  |         /// <param name="e"></param> | 
					
						
							|  |  |  |  |         protected void Page_Load(object sender, EventArgs e) | 
					
						
							|  |  |  |  |         { | 
					
						
							|  |  |  |  |             if (!IsPostBack) | 
					
						
							|  |  |  |  |             { | 
					
						
							|  |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                 this.InspectionItemId = Request.Params["InspectionItemId"]; | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                 var item = (from x in Funs.DB.Inspect_InspectionItem  | 
					
						
							|  |  |  |  |                             join y in Funs.DB.Inspect_Inspection on x.InspectionId equals y.InspectionId | 
					
						
							|  |  |  |  |                             where x.InspectionItemId == this.InspectionItemId | 
					
						
							|  |  |  |  |                             select new {  | 
					
						
							|  |  |  |  |                                 InspectionItemId = x.InspectionItemId, | 
					
						
							|  |  |  |  |                                 InspectionId = x.InspectionId, | 
					
						
							|  |  |  |  |                                 ProjectId = y.ProjectId, | 
					
						
							|  |  |  |  |                                 ProjectName = Funs.DB.Base_Project.FirstOrDefault(p => p.ProjectId == y.ProjectId).ProjectName, | 
					
						
							|  |  |  |  |                                 InspectionCode = y.InspectionCode, | 
					
						
							|  |  |  |  |                                 CheckMan = y.CheckMan, | 
					
						
							|  |  |  |  |                                 ProblemTypeName = y.ProblemTypeName, | 
					
						
							|  |  |  |  |                                 Place = y.Place, | 
					
						
							|  |  |  |  |                                 PersonResponsible = y.PersonResponsible, | 
					
						
							|  |  |  |  |                                 PersonResponsibleName = Funs.DB.Sys_User.FirstOrDefault(p => p.UserId == y.PersonResponsible).UserName, | 
					
						
							|  |  |  |  |                                 WorkAreaName = x.WorkAreaName, | 
					
						
							|  |  |  |  |                                 States = y.States, | 
					
						
							|  |  |  |  |                                 ItemStates = x.States, | 
					
						
							|  |  |  |  |                                 EvaluateResults = x.EvaluateResults, | 
					
						
							|  |  |  |  |                                 BeforelUrl = x.BeforelUrl, | 
					
						
							|  |  |  |  |                                 AfterUrl = x.AfterUrl, | 
					
						
							|  |  |  |  |                                 AuditTime = x.AuditTime, | 
					
						
							|  |  |  |  |                                 AuditMan = x.AuditMan, | 
					
						
							|  |  |  |  |                                 RectificationResults = x.RectificationResults, | 
					
						
							|  |  |  |  |                                 AuditManName = Funs.DB.Sys_User.FirstOrDefault(p => p.UserId == x.AuditMan).UserName | 
					
						
							|  |  |  |  |                             } | 
					
						
							|  |  |  |  |                             ).FirstOrDefault(); | 
					
						
							|  |  |  |  |                 this.Code.Text = item.InspectionCode; | 
					
						
							|  |  |  |  |                 this.PName.Text = item.ProjectName; | 
					
						
							|  |  |  |  |                 this.Cman.Text = item.CheckMan; | 
					
						
							| 
									
										
										
										
											2025-04-15 20:48:53 +08:00
										 |  |  |  |                 this.Pman.Text = item.PersonResponsibleName; | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                 this.Ptype.Text = item.ProblemTypeName; | 
					
						
							|  |  |  |  |                 this.Iarea.Text = item.Place; | 
					
						
							|  |  |  |  |                 this.Carea.Text = item.WorkAreaName; | 
					
						
							|  |  |  |  |                 this.conclusion.Text = item.RectificationResults; | 
					
						
							|  |  |  |  |                 this.divImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment(ConfigurationManager.AppSettings["CEMS_IMG_URL"], item.BeforelUrl); | 
					
						
							|  |  |  |  |                 this.divRectificationImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment(ConfigurationManager.AppSettings["CEMS_IMG_URL"], item.AfterUrl); | 
					
						
							|  |  |  |  | 
 | 
					
						
							|  |  |  |  |                 if (item.States == "1"&&item.ItemStates == "1") | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |                 { | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                     this.state.Text = "待提交"; | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                 if (item.States == "2" && item.ItemStates == "1") | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |                 { | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |                     this.state.Text = "待审批"; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 if (item.States == "2" && item.ItemStates == "2") | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     this.state.Text = "待整改"; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 if (item.States == "2" && item.ItemStates == "3") | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     this.state.Text = "已闭环"; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 if (item.States == "2" && item.ItemStates == "3") | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     this.state.Text = "已闭环"; | 
					
						
							|  |  |  |  |                 } | 
					
						
							|  |  |  |  |                 if(item.States == "3") | 
					
						
							|  |  |  |  |                 { | 
					
						
							|  |  |  |  |                     this.state.Text = "已闭环"; | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |                 } | 
					
						
							|  |  |  |  |             } | 
					
						
							|  |  |  |  |         } | 
					
						
							| 
									
										
										
										
											2025-04-06 23:26:22 +08:00
										 |  |  |  |         #endregion | 
					
						
							|  |  |  |  |         | 
					
						
							| 
									
										
										
										
											2025-02-12 09:27:47 +08:00
										 |  |  |  |     } | 
					
						
							|  |  |  |  | } |