184 lines
8.4 KiB
C#
184 lines
8.4 KiB
C#
using BLL;
|
|
using Newtonsoft.Json.Linq;
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace FineUIPro.Web.Customization.CNECE7.ZHGL.Person
|
|
{
|
|
public partial class PersonInfoView : PageBase
|
|
{
|
|
#region 定义项
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
public string PersonId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["PersonId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["PersonId"] = value;
|
|
}
|
|
}
|
|
public string PersonQualityId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["PersonQualityId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["PersonQualityId"] = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 加载页面
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.PersonId = Request.Params["PersonId"];
|
|
if (!string.IsNullOrEmpty(this.PersonId))
|
|
{
|
|
var person = BLL.PersonService.GetPersonById(this.PersonId);
|
|
if (person != null)
|
|
{
|
|
this.rblSex.Text = GetGender(person.Sex);
|
|
this.txtUnitName.Text = UnitService.GetUnitNameByUnitId(person.UnitId);
|
|
this.txtUnitName1.Text = this.txtUnitName.Text;
|
|
this.drpWorkArea.Text = WorkAreaService.GetWorkAreaNameByWorkAreaId(person.WorkAreaId);
|
|
this.drpPost.Text = WorkPostService.getWorkPostNameById(person.WorkPostId);
|
|
this.txtWorkPostName.Text = this.drpPost.Text;
|
|
this.drpPosition.Text = PositionService.getPositionNameById(person.PositionId);
|
|
this.drpTitle.Text = PostTitleService.GetPostTitleNameById(person.PostTitleId);
|
|
this.drpTeamGroup.Text = TeamGroupService.getTeamGroupNameById(person.TeamGroupId);
|
|
this.drpAuditor.Text = UserService.GetUserNameByUserId(person.AuditorId);
|
|
this.rblIsUsed.Text = GetIsOrNo(person.IsUsed);
|
|
this.txtCardNo.Text = person.CardNo;
|
|
this.txtPersonName.Text = person.PersonName;
|
|
this.txtPersonName1.Text = person.PersonName;
|
|
this.txtIdentityCard.Text = person.IdentityCard;
|
|
this.txtAddress.Text = person.Address;
|
|
this.txtTelephone.Text = person.Telephone;
|
|
this.txtOutResult.Text = person.OutResult;
|
|
if (person.IsForeign.HasValue)
|
|
{
|
|
this.ckIsForeign.Checked = person.IsForeign.Value;
|
|
}
|
|
if (person.IsOutside.HasValue)
|
|
{
|
|
this.ckIsOutside.Checked = person.IsOutside.Value;
|
|
}
|
|
if (person.InTime.HasValue)
|
|
{
|
|
this.txtInTime.Text = string.Format("{0:yyyy-MM-dd}", person.InTime);
|
|
}
|
|
if (person.OutTime.HasValue)
|
|
{
|
|
this.txtOutTime.Text = string.Format("{0:yyyy-MM-dd}", person.OutTime);
|
|
}
|
|
if (person.AuditorDate.HasValue)
|
|
{
|
|
this.txtAuditorDate.Text = string.Format("{0:yyyy-MM-dd}", person.AuditorDate);
|
|
this.drpAuditor.Readonly = true;
|
|
this.txtAuditorDate.Readonly = true;
|
|
}
|
|
if (!string.IsNullOrEmpty(person.PhotoUrl))
|
|
{
|
|
imgPhoto.ImageUrl = "~/SitePerson/" + person.PhotoUrl;
|
|
}
|
|
this.drpLanguages.Text = person.Languages;
|
|
this.drpPersonStates.SelectedValue = person.PersonStates;
|
|
}
|
|
|
|
var personQuality = BLL.PersonQualityService.GetPersonQualityByPersonId(this.PersonId);
|
|
if (personQuality != null)
|
|
{
|
|
PersonQualityId = personQuality.PersonQualityId;
|
|
this.txtCertificateName.Text = CertificateService.getCertificateNameById(personQuality.CertificateId);
|
|
this.txtCertificateNo.Text = personQuality.CertificateNo;
|
|
this.txtGrade.Text = personQuality.Grade;
|
|
this.txtSendUnit.Text = personQuality.SendUnit;
|
|
this.txtSendDate.Text = string.Format("{0:yyyy-MM-dd}", personQuality.SendDate);
|
|
this.txtLimitDate.Text = string.Format("{0:yyyy-MM-dd}", personQuality.LimitDate);
|
|
this.txtLateCheckDate.Text = string.Format("{0:yyyy-MM-dd}", personQuality.LateCheckDate);
|
|
this.txtApprovalPerson.Text = personQuality.ApprovalPerson;
|
|
this.txtRemark.Text = personQuality.Remark;
|
|
this.txtAuditDate.Text = string.Format("{0:yyyy-MM-dd}", personQuality.AuditDate);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnQR_Click(object sender, EventArgs e)
|
|
{
|
|
string strCode = "person$" + this.txtIdentityCard.Text.Trim();
|
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/SeeQRImage.aspx?PersonId={0}&strCode={1}", this.PersonId, strCode), "二维码查看", 400, 400));
|
|
}
|
|
|
|
#region 附件上传
|
|
/// <summary>
|
|
/// 上传附件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl1_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/IdCardAttachUrl&menuId={1}&strParam=1", this.PersonId, BLL.Const.ProjectPersonChangeMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 上传附件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl2_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/PersonBaseInfo&menuId={1}&strParam=2", this.PersonId, BLL.Const.ProjectPersonChangeMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 上传附件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl3_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/PersonBaseInfo&menuId={1}&strParam=3", this.PersonId, BLL.Const.ProjectPersonChangeMenuId)));
|
|
}
|
|
/// <summary>
|
|
/// 上传附件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl4_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/PersonBaseInfo&menuId={1}&strParam=4", this.PersonId, BLL.Const.ProjectPersonChangeMenuId)));
|
|
}
|
|
#endregion
|
|
|
|
#region 证书
|
|
/// <summary>
|
|
/// 上传附件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/PersonQualityAttachUrl&menuId={1}&type=-1", PersonQualityId, BLL.Const.PersonQualityMenuId)));
|
|
}
|
|
#endregion
|
|
}
|
|
} |