using System; namespace FineUIPro.Web.common.BaseInfo { public partial class ProjectView : PageBase { #region 定义变量 /// /// 主键 /// private string ProjectId { get { return (string)ViewState["ProjectId"]; } set { ViewState["ProjectId"] = value; } } #endregion #region 加载 /// /// 加载页面 /// /// /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); this.ProjectId = Request.Params["ProjectId"]; if (!string.IsNullOrEmpty(this.ProjectId)) { var q = BLL.Base_ProjectService.GetProjectByProjectId(this.ProjectId); if (q != null) { txtProjectCode.Text = q.ProjectCode; txtProjectName.Text = q.ProjectName; txtShortName.Text = q.ShortName; txtProjectAddress.Text = q.ProjectAddress; if (q.StartDate.HasValue) { txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", q.StartDate); } if (q.EndDate.HasValue) { txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", q.EndDate); } this.txtProjectPrincipal.Text = q.ProjectPrincipal; this.txtConstructionPrincipal.Text = q.ConstructionPrincipal; txtRemark.Text = q.Remark; if (q.IsClosed.HasValue) { this.ckbIsClosed.Checked = q.IsClosed.Value; } } } } } #endregion } }