SGGL_HBAZ/SGGL/FineUIPro.Web/OfficeCheck/Inspect/ProjectQualityInspectionVie...

102 lines
4.2 KiB
C#

using BLL;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.OfficeCheck.Inspect
{
public partial class ProjectQualityInspectionView : System.Web.UI.Page
{
#region
public string InspectionItemId
{
get
{
return (string)ViewState["InspectionItemId"];
}
set
{
ViewState["InspectionItemId"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
this.InspectionItemId = Request.Params["InspectionItemId"];
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,
ProblemDetial = x.ProblemDetial,
RectificationDescription = x.RectificationDescription
}
).FirstOrDefault();
this.QDetails.Text = item.ProblemDetial;
this.suggest.Text = item.RectificationDescription;
this.Code.Text = item.InspectionCode;
this.PName.Text = item.ProjectName;
this.Cman.Text = item.CheckMan;
this.Pman.Text = item.PersonResponsibleName;
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")
{
this.state.Text = "待提交";
}
if (item.States == "2" && item.ItemStates == "1")
{
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 = "已闭环";
}
}
}
}