This commit is contained in:
2022-12-03 09:55:20 +08:00
11 changed files with 160 additions and 85 deletions
+3 -1
View File
@@ -127,7 +127,7 @@
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 50%">
<f:FormRow ColumnWidths="20% 15% 15% 50%">
<Items>
<f:RadioButtonList ID="rblSex" runat="server" Label="性别">
<f:RadioItem Value="1" Text="男" Selected="true" />
@@ -135,6 +135,8 @@
</f:RadioButtonList>
<f:CheckBox runat="server" ID="ckIsPost" Label="在职" Checked="true"
AutoPostBack="true" OnCheckedChanged="ckIsPost_CheckedChanged"></f:CheckBox>
<f:CheckBox runat="server" ID="ckIsMultiProject" Label="多项目"
AutoPostBack="true" OnCheckedChanged="ckIsMultiProject_CheckedChanged"></f:CheckBox>
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期">
</f:DatePicker>
</Items>
@@ -92,6 +92,7 @@ namespace FineUIPro.Web.Person
this.txtJobNum.Text = person.JobNum;
this.drpUnit.SelectedValue = person.UnitId;
this.ckIsPost.Checked = person.IsPost ?? true;
this.ckIsMultiProject.Checked = person.MultiProject ?? false;
if (!string.IsNullOrEmpty(person.DepartId))
{
this.drpDepart.SelectedValue = person.DepartId;
@@ -528,6 +529,7 @@ namespace FineUIPro.Web.Person
Address = this.txtAddress.Text.Trim(),
SignatureUrl = this.SignatureUrl,
IsPost = this.ckIsPost.Checked,
MultiProject=this.ckIsMultiProject.Checked,
};
newPerson.RoleIds = Funs.GetStringByArray(this.drpRole.SelectedValueArray);
@@ -1087,5 +1089,18 @@ namespace FineUIPro.Web.Person
Alert.ShowInParent("人员不在职,则当前人所在的所有项目都将离场!", MessageBoxIcon.Warning);
}
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ckIsMultiProject_CheckedChanged(object sender, CheckedEventArgs e)
{
if (this.ckIsMultiProject.Checked)
{
Alert.ShowInParent("人员可在多个项目上同时在岗!", MessageBoxIcon.Warning);
}
}
}
}
+9
View File
@@ -248,6 +248,15 @@ namespace FineUIPro.Web.Person
/// </remarks>
protected global::FineUIPro.CheckBox ckIsPost;
/// <summary>
/// ckIsMultiProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckIsMultiProject;
/// <summary>
/// txtBirthday 控件。
/// </summary>
@@ -20,6 +20,8 @@ namespace FineUIPro.Web.Person
this.GetButtonPower();
this.btnNew.OnClientClick = Window1.GetShowReference("ProjectPersonEdit.aspx") + "return false;";
ProjectService.InitProjectShortNameDropDownList(this.drpProject, false);
this.drpProject.SelectedIndex= 0;
Funs.FineUIPleaseSelect(drpProject, "按项目查询");
Funs.FineUIPleaseSelect(drpUnit, "按单位查询");
WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, false);
@@ -281,7 +281,11 @@ namespace FineUIPro.Web.Person
var getProjectPerson = SitePerson_PersonService.GetSitePersonById(this.SitePersonId);
if (getProjectPerson != null)
{
this.txtIdentityCard.Text = getProjectPerson.IdentityCard;
if (!string.IsNullOrEmpty(getProjectPerson.IdentityCard))
{
this.txtIdentityCard.Text = getProjectPerson.IdentityCard;
}
if (!string.IsNullOrEmpty(getProjectPerson.PersonName))
{
this.txtPersonName.Text = getProjectPerson.PersonName;
@@ -302,7 +306,7 @@ namespace FineUIPro.Web.Person
{
this.btnOut.Hidden = false;
}
this.drpProject.SelectedValue = getProjectPerson.ProjectId;
InitDropDownListProject();
this.drpUnit.SelectedValue = getProjectPerson.UnitId;