114 lines
3.6 KiB
C#
114 lines
3.6 KiB
C#
using BLL;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
|
|
namespace FineUIPro.Web.CQMS.Check
|
|
{
|
|
public partial class SpecialCheckListView : PageBase
|
|
{
|
|
/// <summary>
|
|
/// 专项巡检主键
|
|
/// </summary>
|
|
public string CheckSpecialId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["CheckSpecialId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["CheckSpecialId"] = value;
|
|
}
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
CheckSpecialId = Request.Params["CheckSpecialId"];
|
|
if (!string.IsNullOrEmpty(CheckSpecialId))
|
|
{
|
|
binData();
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 加载数据
|
|
/// </summary>
|
|
void binData()
|
|
{
|
|
Model.Check_CheckSpecialDataIn model = Funs.DB.Check_CheckSpecialDataIn.FirstOrDefault(x => x.CheckSpecialId == CheckSpecialId);
|
|
if (model != null)
|
|
{
|
|
if (model.UnitId != null)
|
|
{
|
|
var unit = UnitService.GetUnitByUnitId(model.UnitId);
|
|
if (unit != null)
|
|
{
|
|
txtProjectQualityType.Text = unit.UnitName;
|
|
}
|
|
}
|
|
if (model.CheckTime != null)
|
|
{
|
|
txtCheckTime.Text = Convert.ToDateTime(model.CheckTime).ToString("yyyy-MM-dd");
|
|
}
|
|
txtCheckType.Text = model.CheckType;
|
|
txtCheckClass.Text = model.CheckClass;
|
|
if (model.CheckPerson!=null)
|
|
{
|
|
txtCheckPerson.Text = UserService.GetUserNameByUserId(model.CheckPerson);
|
|
}
|
|
txtCheckPersonOther.Text = model.CheckPersonOther;
|
|
txtCheckAreas.Text = model.CheckAreas;
|
|
|
|
if (model.WorkAreaId != null)
|
|
{
|
|
var type = UnitWorkService.getUnitWorkByUnitWorkId(model.WorkAreaId.ToString());
|
|
if (type != null)
|
|
{
|
|
txtWorkArea.Text = type.UnitWorkName;
|
|
}
|
|
|
|
|
|
}
|
|
if (model.CNProfessionalCode!=null)
|
|
{
|
|
var CNProfessionalModel = CNProfessionalService.GetCNProfessional(model.CNProfessionalCode.ToString());
|
|
if (CNProfessionalModel != null)
|
|
{
|
|
txtCNProfessionalCode.Text = CNProfessionalModel.ProfessionalName;
|
|
}
|
|
}
|
|
|
|
|
|
if (model.CheckUnitId != null)
|
|
{
|
|
var unit = UnitService.GetUnitByUnitId(model.CheckUnitId);
|
|
if (unit != null)
|
|
{
|
|
txtCheckUnitId.Text = unit.UnitName;
|
|
}
|
|
}
|
|
|
|
if (model.ResponseMan != null)
|
|
{
|
|
txtResponseMan.Text= UserService.GetUserNameByUserId(model.ResponseMan.ToString());
|
|
|
|
}
|
|
txtProblemType.Text = model.ProblemType;
|
|
txtProblemDes.Text = model.ProblemDes;
|
|
txtSuggest.Text = model.Suggest;
|
|
|
|
if (model.LimitedTime != null)
|
|
{
|
|
txtLimitedTime.Text = Convert.ToDateTime(model.LimitedTime).ToString("yyyy-MM-dd");
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
} |