Esempio n. 1
0
 /// <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.RegistrationId         = Request.Params["RegistrationId"];
         if (!string.IsNullOrEmpty(this.RegistrationId))
         {
             Model.View_Inspection_Registration registration = BLL.RegistrationService.GetRegistrationById(this.RegistrationId);
             if (registration != null)
             {
                 this.txtWorkAreaName.Text           = registration.WorkAreaName;
                 this.txtResponsibilityUnitName.Text = registration.ResponsibilityUnitName;
                 this.txtProblemTypes.Text           = registration.ProblemTypes;
                 this.txtProblemDescription.Text     = registration.ProblemDescription;
                 this.txtTakeSteps.Text             = registration.TakeSteps;
                 this.txtResponsibilityManName.Text = registration.ResponsibilityManName;
                 this.txtRectificationPeriod.Text   = string.Format("{0:yyyy-MM-dd}", registration.RectificationPeriod);
                 this.txtCheckManName.Text          = registration.CheckManName;
                 this.txtCheckTime.Text             = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.CheckTime);
                 this.txtRectificationTime.Text     = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.RectificationTime);
                 this.txtStates.Text        = registration.States;
                 this.ImageUrl              = registration.ImageUrl;
                 this.divImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../", this.ImageUrl);
                 this.RectificationImageUrl = registration.RectificationImageUrl;
                 this.divRectificationImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../", this.RectificationImageUrl);
             }
         }
     }
 }
Esempio n. 2
0
        /// <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.RegistrationId = Request.Params["RegistrationId"];
                if (!string.IsNullOrEmpty(this.RegistrationId))
                {
                    Model.View_Inspection_Registration registration = BLL.RegistrationService.GetRegistrationById(this.RegistrationId);
                    if (registration != null)
                    {
                        ///单位
                        BLL.UnitService.InitUnitDropDownList(this.drpResponsibilityUnit, registration.ProjectId, false);
                        //区域
                        BLL.WorkAreaService.InitWorkAreaDropDownList(this.drpWorkArea, registration.ProjectId, false);
                        if (!string.IsNullOrEmpty(registration.WorkAreaId))
                        {
                            this.drpWorkArea.SelectedValue = registration.WorkAreaId;
                        }
                        if (!string.IsNullOrEmpty(registration.ResponsibilityUnitId))
                        {
                            this.drpResponsibilityUnit.SelectedValue = registration.ResponsibilityUnitId;
                            BLL.UserService.InitUserProjectIdUnitIdDropDownList(this.drpResponsibilityMan, registration.ProjectId, registration.ResponsibilityUnitId, false);
                            if (!string.IsNullOrEmpty(registration.ResponsibilityManId))
                            {
                                this.drpResponsibilityMan.SelectedValue = registration.ResponsibilityManId;
                            }
                        }

                        this.txtProblemTypes.Text       = registration.ProblemTypes;
                        this.txtProblemDescription.Text = registration.ProblemDescription;
                        this.txtTakeSteps.Text          = registration.TakeSteps;

                        if (registration.RectificationPeriod.HasValue)
                        {
                            this.txtRectificationPeriod.Text = string.Format("{0:yyyy-MM-dd}", registration.RectificationPeriod);
                            this.txtH.Text = registration.RectificationPeriod.Value.Hour.ToString();
                            this.txtM.Text = registration.RectificationPeriod.Value.Minute.ToString();
                        }
                        this.txtCheckManName.Text  = registration.CheckManName;
                        this.txtCheckTime.Text     = string.Format("{0:yyyy-MM-dd HH:mm:ss}", registration.CheckTime);
                        this.txtStates.Text        = registration.States;
                        this.ImageUrl              = registration.ImageUrl;
                        this.divImageUrl.InnerHtml = BLL.UploadAttachmentService.ShowAttachment("../", this.ImageUrl);
                    }
                }
            }
        }