107 lines
3.9 KiB
C#
107 lines
3.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using BLL;
|
|
using FineUIPro.Web.Perfomance;
|
|
|
|
namespace FineUIPro.Web.ThreeYearAction.ConstructionStandardization
|
|
{
|
|
public partial class BenchmarkWorkSiteView : PageBase
|
|
{
|
|
#region 定义项
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
private string Id
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["Id"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["Id"] = value;
|
|
}
|
|
}
|
|
|
|
///// <summary>
|
|
///// 附件路径
|
|
///// </summary>
|
|
//public string AttachUrl
|
|
//{
|
|
// get
|
|
// {
|
|
// return (string)ViewState["AttachUrl"];
|
|
// }
|
|
// set
|
|
// {
|
|
// ViewState["AttachUrl"] = value;
|
|
// }
|
|
//}
|
|
#endregion
|
|
|
|
#region 加载
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
this.Id = Request.Params["Id"];
|
|
if (!string.IsNullOrEmpty(this.Id))
|
|
{
|
|
Model.ConstructionStandardization_BenchmarkWorkSite model = BLL.BenchmarkWorkSiteService.GetById(this.Id);
|
|
if (model != null)
|
|
{
|
|
this.txtCode.Text = model.Code;
|
|
this.txtName.Text = model.Name;
|
|
//this.txtCode.Text = CodeRecordsService.ReturnCodeByDataId(this.Id);
|
|
var project = BLL.ProjectService.GetProjectByProjectId(model.ProjectId);
|
|
if (project != null)
|
|
{
|
|
this.txtProjectName.Text = project.ProjectName;
|
|
}
|
|
if (!string.IsNullOrEmpty(model.GeneralContractor))
|
|
{
|
|
var generalContractor = BLL.UnitService.GetUnitByUnitId(model.GeneralContractor);
|
|
if (generalContractor != null)
|
|
{
|
|
this.txtGeneralContractorUnitName.Text = generalContractor.UnitName;
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(model.Supervisor))
|
|
{
|
|
var supervisor = BLL.UnitService.GetUnitByUnitId(model.Supervisor);
|
|
if (supervisor != null)
|
|
{
|
|
this.txtSupervisor.Text = supervisor.UnitName;
|
|
}
|
|
}
|
|
if (!string.IsNullOrEmpty(model.Owner))
|
|
{
|
|
var owner = BLL.UnitService.GetUnitByUnitId(model.Owner);
|
|
if (owner != null)
|
|
{
|
|
this.txtOwner.Text = owner.UnitName;
|
|
}
|
|
}
|
|
this.txtAchieveResults.Text = model.AchieveResults;
|
|
this.txtGraphicProgress.Text = model.GraphicProgress;
|
|
this.txtUnitOpinion.Text = model.UnitOpinion;
|
|
var user = BLL.UserService.GetUserByUserId(model.CompileMan);
|
|
this.txtCompileMan.Text = user.UserName;
|
|
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd mm:HH:ss}", model.CompileDate);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |