Exemplo n.º 1
0
        /// <summary>
        /// 加载数据
        /// </summary>
        private void LoadInfo()
        {
            int id = RequestHelper.GetRequestInt("id", 0);

            if (id > 0)
            {
                DataTable dt = operate.GetPotentialByID(id);
                if (dt != null && dt.Rows.Count > 0)
                {
                    this.txtPersonid.Text          = HttpUtility.HtmlDecode(dt.Rows[0]["PersonID"].ToString());
                    this.txtPerson.Text            = HttpUtility.HtmlDecode(dt.Rows[0]["PersonName"].ToString());
                    this.txtWorkName.Text          = HttpUtility.HtmlDecode(dt.Rows[0]["WorkName"].ToString());
                    this.ddlWorkType.SelectedValue = HttpUtility.HtmlDecode(dt.Rows[0]["WorkType"].ToString());
                    this.txtDy.Text = HttpUtility.HtmlDecode(dt.Rows[0]["dy"].ToString());

                    this.txtZy.Text        = HttpUtility.HtmlDecode(dt.Rows[0]["zy"].ToString());
                    this.txtWorkInfo.Text  = HttpUtility.HtmlDecode(dt.Rows[0]["WorkInfo"].ToString());
                    this.txtRelease.Text   = HttpUtility.HtmlDecode(dt.Rows[0]["Release"].ToString());
                    this.imgPhoto.ImageUrl = HttpUtility.HtmlDecode(dt.Rows[0]["ImgPath"].ToString());
                }
                else
                {
                    Alert.ShowInParent("读取数据失败!", String.Empty, ActiveWindow.GetHideReference());
                }
            }
        }