SGGL_SHJ/SGGL/FineUIPro.Web/Person/DepartPersonDutyView.aspx.cs

39 lines
1.5 KiB
C#

using BLL;
using System;
using System.Web;
namespace FineUIPro.Web.Person
{
public partial class DepartPersonDutyView : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(drpSEDINUser, null, Const.UnitId_SEDIN, null, true);
WorkPostService.InitMainWorkPostDropDownList(drpWorkPost, true);
string DutyId = Request.Params["DutyId"];
if (!string.IsNullOrEmpty(DutyId))
{
var PersonDuty = BLL.Person_DutyService.GetPersonDutyById(DutyId);
if (PersonDuty != null)
{
if (!string.IsNullOrEmpty(PersonDuty.DutyPersonId))
{
this.drpSEDINUser.SelectedValue = PersonDuty.DutyPersonId;
}
if (!string.IsNullOrEmpty(PersonDuty.WorkPostId))
{
this.drpWorkPost.SelectedValue = PersonDuty.WorkPostId;
}
if (!string.IsNullOrEmpty(PersonDuty.Template))
{
this.txtTemplate.Text = HttpUtility.HtmlDecode(PersonDuty.Template);
}
}
}
}
}
}
}