79 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			C#
		
	
	
	
using System;
 | 
						|
 | 
						|
namespace FineUIPro.Web.WelderManage
 | 
						|
{
 | 
						|
    public partial class WelderManageView : PageBase
 | 
						|
    {
 | 
						|
        #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();
 | 
						|
 | 
						|
                string welderId = Request.Params["WelderId"];
 | 
						|
                if (!string.IsNullOrEmpty(welderId))
 | 
						|
                {
 | 
						|
                    Model.Welder_Welder welder = BLL.WelderService.GetWelderById(welderId);
 | 
						|
                    if (welder != null)
 | 
						|
                    {
 | 
						|
                        this.txtWelderCode.Text = welder.WelderCode;
 | 
						|
                        this.txtWelderName.Text = welder.WelderName;
 | 
						|
                        if (!string.IsNullOrEmpty(welder.UnitId))
 | 
						|
                        {
 | 
						|
                            this.txtUnitName.Text = BLL.Base_UnitService.GetUnitNameByUnitId(welder.UnitId);
 | 
						|
                        }
 | 
						|
                        this.rblSex.SelectedValue = welder.Sex;
 | 
						|
                        if (welder.Birthday.HasValue)
 | 
						|
                        {
 | 
						|
                            this.txtBirthday.Text = string.Format("{0:yyyy-MM-dd}", welder.Birthday);
 | 
						|
                        }
 | 
						|
                        this.txtIdentityCard.Text = welder.IdentityCard;
 | 
						|
                        this.txtCertificateNum.Text = welder.CertificateNum;
 | 
						|
                        if (welder.CertificateValidity.HasValue)
 | 
						|
                        {
 | 
						|
                            this.txtCertificateValidity.Text = string.Format("{0:yyyy-MM-dd}", welder.CertificateValidity);
 | 
						|
                        }
 | 
						|
                        this.txtWelderLevel.Text = welder.WelderLevel;
 | 
						|
                        if (welder.IsOnDuty == true)
 | 
						|
                        {
 | 
						|
                            cbIsOnDuty.Checked = true;
 | 
						|
                        }
 | 
						|
                        else
 | 
						|
                        {
 | 
						|
                            cbIsOnDuty.Checked = false;
 | 
						|
                        }
 | 
						|
                        this.txtRemark.Text = welder.Remark;
 | 
						|
                        if (!string.IsNullOrEmpty(welder.PhotoUrl))
 | 
						|
                        {
 | 
						|
                            this.Image1.ImageUrl = "~/" + welder.PhotoUrl;
 | 
						|
                        }
 | 
						|
                    }
 | 
						|
                }
 | 
						|
            }
 | 
						|
        }
 | 
						|
        #endregion
 | 
						|
 | 
						|
        #region 附件上传
 | 
						|
        /// <summary>
 | 
						|
        /// 上传附件资源
 | 
						|
        /// </summary>
 | 
						|
        /// <param name="sender"></param>
 | 
						|
        /// <param name="e"></param>
 | 
						|
        protected void btnAttachUrl_Click(object sender, EventArgs e)
 | 
						|
        {
 | 
						|
            string edit = "0";
 | 
						|
            string welderId = Request.Params["WelderId"];
 | 
						|
            if (!string.IsNullOrEmpty(welderId))
 | 
						|
            {
 | 
						|
                PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WelderManage&menuId={1}&edit={2}", welderId, BLL.Const.WelderManageMenuId, edit)));
 | 
						|
            }
 | 
						|
        }
 | 
						|
        #endregion
 | 
						|
    }
 | 
						|
} |