Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
commit
00616b7fa0
|
|
@ -71,6 +71,7 @@ namespace BLL
|
||||||
{
|
{
|
||||||
getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard));
|
getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(isPost) && isPost != "-1" && isPost != Const._Null)
|
if (!string.IsNullOrEmpty(isPost) && isPost != "-1" && isPost != Const._Null)
|
||||||
{
|
{
|
||||||
if (isPost == Const._True)
|
if (isPost == Const._True)
|
||||||
|
|
@ -680,7 +681,7 @@ namespace BLL
|
||||||
WorkDate = person.WorkDate,
|
WorkDate = person.WorkDate,
|
||||||
RetirementDate = person.RetirementDate,
|
RetirementDate = person.RetirementDate,
|
||||||
RelativeName = person.RelativeName,
|
RelativeName = person.RelativeName,
|
||||||
RelativeTel = person.RelativeTel,
|
RelativeTel = person.RelativeTel,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||||
|
|
@ -929,7 +930,6 @@ namespace BLL
|
||||||
newPerson.RetirementDate = person.RetirementDate;
|
newPerson.RetirementDate = person.RetirementDate;
|
||||||
newPerson.RelativeName = person.RelativeName;
|
newPerson.RelativeName = person.RelativeName;
|
||||||
newPerson.RelativeTel = person.RelativeTel;
|
newPerson.RelativeTel = person.RelativeTel;
|
||||||
|
|
||||||
// newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
// newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
||||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ namespace BLL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static IQueryable<Model.Person_Persons> getDataLists = from x in db.Person_Persons
|
private static IQueryable<Model.Person_Persons> getDataLists = from x in db.Person_Persons
|
||||||
where x.PersonId != Const.sysglyId && x.PersonId != Const.hfnbdId && x.UnitId == Const.UnitId_SEDIN
|
where x.PersonId != Const.sysglyId && x.PersonId != Const.hfnbdId && x.UnitId == Const.UnitId_SEDIN
|
||||||
&& x.DepartId == Const.Depart_constructionId && (!x.IsPost.HasValue || x.IsPost == true)
|
&& x.DepartId == Const.Depart_constructionId
|
||||||
|
&& x.CurrentProjectId == null && (!x.IsOffice.HasValue || x.IsOffice == false)
|
||||||
select x;
|
select x;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -89,6 +90,7 @@ namespace BLL
|
||||||
x.CurrentProjectWorkPostId,
|
x.CurrentProjectWorkPostId,
|
||||||
CurrentProjectWorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.CurrentProjectWorkPostId),
|
CurrentProjectWorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.CurrentProjectWorkPostId),
|
||||||
IsPost = x.IsPost ?? true,
|
IsPost = x.IsPost ?? true,
|
||||||
|
IsPostName = x.IsPost == false ? "否" : "是",
|
||||||
x.SignatureUrl,
|
x.SignatureUrl,
|
||||||
x.CertificateId,
|
x.CertificateId,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -236,20 +236,17 @@ namespace BLL
|
||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var units = (from x in db.Base_Unit
|
var units = from x in db.Base_Unit
|
||||||
orderby x.UnitCode
|
select x;
|
||||||
select x).ToList();
|
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||||
if (!string.IsNullOrEmpty(projectId))
|
|
||||||
{
|
{
|
||||||
units = (from x in units
|
units = from x in units
|
||||||
join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId
|
join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||||
where y.ProjectId == projectId
|
where y.ProjectId == projectId
|
||||||
select x).ToList();
|
select x;
|
||||||
}
|
}
|
||||||
|
|
||||||
units = units.OrderBy(x => x.UnitCode).ToList();
|
return units.OrderBy(x => x.UnitCode).ToList(); ;
|
||||||
|
|
||||||
return units;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -21,7 +21,7 @@
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="部门员工" EnableHeaderMenu="true"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="部门员工" EnableHeaderMenu="true"
|
||||||
runat="server" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true"
|
runat="server" DataKeyNames="PersonId" DataIDField="PersonId" AllowSorting="true"
|
||||||
SortField="PersonName" EnableColumnLines="true" BoxFlex="1" PageSize="10" ForceFit="true"
|
SortField="PersonName" EnableColumnLines="true" BoxFlex="1" PageSize="10" ForceFit="true"
|
||||||
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
|
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
|
||||||
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
|
OnPageIndexChange="Grid1_PageIndexChange" EnableRowDoubleClickEvent="true"
|
||||||
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||||
|
|
@ -188,6 +188,9 @@
|
||||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||||
Hidden="true" runat="server" Text="编辑" Icon="Pencil">
|
Hidden="true" runat="server" Text="编辑" Icon="Pencil">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDispatch" OnClick="btnMenuDispatch_Click" EnablePostBack="true"
|
||||||
|
Hidden="true" runat="server" Text="派遣" Icon="TableEdit">
|
||||||
|
</f:MenuButton>
|
||||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||||
Hidden="true" ConfirmText="确定删除选中行?" ConfirmTarget="Parent" runat="server"
|
Hidden="true" ConfirmText="确定删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||||
Icon="Delete" Text="删除">
|
Icon="Delete" Text="删除">
|
||||||
|
|
@ -232,6 +235,12 @@
|
||||||
var rowData = getRowDataViaMenuItem(this);
|
var rowData = getRowDataViaMenuItem(this);
|
||||||
__doPostBack('', 'editit$Action1$' + rowData.index + '$' + rowData.id);
|
__doPostBack('', 'editit$Action1$' + rowData.index + '$' + rowData.id);
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
type: 'menuitem', text: '派遣', icon: '../res/icon/application_form_edit.png',
|
||||||
|
handler: function () {
|
||||||
|
var rowData = getRowDataViaMenuItem(this);
|
||||||
|
__doPostBack('', 'dispatch$Action5$' + rowData.index + '$' + rowData.id);
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
type: 'menuitem', text: '人员详情', icon: '../res/icon/folder_user.png',
|
type: 'menuitem', text: '人员详情', icon: '../res/icon/folder_user.png',
|
||||||
handler: function () {
|
handler: function () {
|
||||||
|
|
@ -251,7 +260,8 @@
|
||||||
var rowData = getRowDataViaMenuItem(this);
|
var rowData = getRowDataViaMenuItem(this);
|
||||||
__doPostBack('', 'salary$Action4$' + rowData.index + '$' + rowData.id);
|
__doPostBack('', 'salary$Action4$' + rowData.index + '$' + rowData.id);
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,21 +7,6 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
public partial class DepartPerson : PageBase
|
public partial class DepartPerson : PageBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 页面
|
|
||||||
/// </summary>
|
|
||||||
//public int? PageSize
|
|
||||||
//{
|
|
||||||
// get
|
|
||||||
// {
|
|
||||||
// return (int?)ViewState["PageSize"];
|
|
||||||
// }
|
|
||||||
// set
|
|
||||||
// {
|
|
||||||
// ViewState["PageSize"] = value;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载页面
|
/// 加载页面
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -63,6 +48,18 @@ namespace FineUIPro.Web.Person
|
||||||
ShowNotify("您没有权限!", MessageBoxIcon.Warning);
|
ShowNotify("您没有权限!", MessageBoxIcon.Warning);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (commandName == "dispatch")
|
||||||
|
{
|
||||||
|
if (!this.btnMenuEdit.Hidden)
|
||||||
|
{
|
||||||
|
////人员直接派遣时候
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPersonEdit.aspx?PersonId={0}&Type=P", personId, "查看 - ")));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify("您没有权限!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (commandName == "details")
|
else if (commandName == "details")
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonView.aspx?PersonId={0}", personId, "查看 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonView.aspx?PersonId={0}", personId, "查看 - ")));
|
||||||
|
|
@ -134,6 +131,7 @@ namespace FineUIPro.Web.Person
|
||||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
{
|
{
|
||||||
this.btnMenuEdit.Hidden = false;
|
this.btnMenuEdit.Hidden = false;
|
||||||
|
this.btnMenuDispatch.Hidden = false;
|
||||||
}
|
}
|
||||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
{
|
{
|
||||||
|
|
@ -302,5 +300,30 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 派遣
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuDispatch_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var getPerson = Person_PersonsService.GetPerson_PersonsById(Grid1.SelectedRowID);
|
||||||
|
if (getPerson != null && getPerson.IsPost == true && getPerson.CurrentProjectId == null)
|
||||||
|
{
|
||||||
|
////人员直接派遣时候
|
||||||
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPersonEdit.aspx?PersonId={0}&Type=P", Grid1.SelectedRowID, "查看 - ")));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert.ShowInParent("请选择在岗且不在项目的人员派遣!", MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -248,6 +248,15 @@ namespace FineUIPro.Web.Person
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDispatch 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDispatch;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnMenuDelete 控件。
|
/// btnMenuDelete 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -28,40 +28,34 @@
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:DropDownList ID="drpWorkPost" runat="server" EmptyText="岗位" Width="150px"
|
<f:DropDownList ID="drpWorkPost" runat="server" EmptyText="岗位" Width="150px"
|
||||||
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpPostTitle" runat="server" EmptyText="职称" Width="150px"
|
<f:DropDownList ID="drpPostTitle" runat="server" EmptyText="职称" Width="150px"
|
||||||
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpCertificate" runat="server" EmptyText="职业资格证书" Width="200px"
|
<f:DropDownList ID="drpCertificate" runat="server" EmptyText="职业资格证书" Width="200px"
|
||||||
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
<f:DropDownList ID="drpProject" runat="server" EmptyText="拟聘项目" Width="350px"
|
|
||||||
EnableEdit="true" ShowRedStar="true" Required="true">
|
|
||||||
</f:DropDownList>
|
|
||||||
<f:ToolbarFill runat="server">
|
<f:ToolbarFill runat="server">
|
||||||
</f:ToolbarFill>
|
</f:ToolbarFill>
|
||||||
<f:Button ID="btnView" ToolTip="查看历史记录" Icon="Find" runat="server" OnClick="btnView_Click">
|
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||||
</f:Button>
|
Hidden="true">
|
||||||
<f:Button ID="btnSure" ToolTip="确定" Icon="Accept" Hidden="true" runat="server" OnClick="btnSure_Click">
|
|
||||||
</f:Button>
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:TemplateField ColumnID="Check" Width="50px" HeaderText="选择" HeaderTextAlign="Center" TextAlign="Center"
|
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
|
||||||
EnableLock="true" Locked="False">
|
TextAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox runat="server" ID="cbSelect" />
|
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="45px" HeaderTextAlign="Center"
|
|
||||||
TextAlign="Center" />
|
|
||||||
<f:RenderField Width="100px" ColumnID="PersonName" DataField="PersonName" SortField="PersonName"
|
<f:RenderField Width="100px" ColumnID="PersonName" DataField="PersonName" SortField="PersonName"
|
||||||
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Left">
|
FieldType="String" HeaderText="姓名" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:TemplateField Width="60px" HeaderText="性别" HeaderTextAlign="Center" TextAlign="Center">
|
<f:TemplateField Width="60px" HeaderText="性别" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbSex" runat="server" Text='<%# GetGender(Eval("Sex")) %>'></asp:Label>
|
<asp:Label ID="lbSex" runat="server" Text='<%# GetGender(Eval("Sex")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|
@ -71,12 +65,15 @@
|
||||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertAgeByIdentityCard(Eval("IdentityCard")) %>'></asp:Label>
|
<asp:Label ID="Label1" runat="server" Text='<%# ConvertAgeByIdentityCard(Eval("IdentityCard")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
<f:RenderField Width="120px" ColumnID="RoleName" DataField="RoleName" SortField="RoleName"
|
<%-- <f:RenderField Width="200px" ColumnID="RoleName" DataField="RoleName" SortField="RoleName"
|
||||||
FieldType="String" HeaderText="本部角色" HeaderTextAlign="Center" TextAlign="Left">
|
FieldType="String" HeaderText="本部角色" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
<f:CheckBoxField Width="60px" SortField="IsPost" RenderAsStaticField="true" DataField="IsPost"
|
<f:CheckBoxField Width="60px" SortField="IsPost" RenderAsStaticField="true" DataField="IsPost"
|
||||||
HeaderText="在岗" HeaderTextAlign="Center" TextAlign="Center">
|
HeaderText="在职" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
</f:CheckBoxField>
|
</f:CheckBoxField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="WorkPostName" DataField="WorkPostName"
|
||||||
|
FieldType="String" HeaderText="岗位" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="PostTitleName" DataField="PostTitleName"
|
<f:RenderField Width="100px" ColumnID="PostTitleName" DataField="PostTitleName"
|
||||||
FieldType="String" HeaderText="职称" HeaderTextAlign="Center" TextAlign="Left">
|
FieldType="String" HeaderText="职称" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|
@ -86,20 +83,26 @@
|
||||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertCertificateNameById(Eval("CertificateId")) %>'></asp:Label>
|
<asp:Label ID="Label2" runat="server" Text='<%# ConvertCertificateNameById(Eval("CertificateId")) %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</f:TemplateField>
|
</f:TemplateField>
|
||||||
<f:RenderField Width="150px" ColumnID="CurrentProjectName" DataField="CurrentProjectName" SortField="CurrentProjectName"
|
<f:RenderField Width="90px" ColumnID="IsPostName" DataField="IsPostName"
|
||||||
|
FieldType="String" HeaderText="是否在职" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
</f:RenderField>
|
||||||
|
<%-- <f:RenderField Width="150px" ColumnID="CurrentProjectName" DataField="CurrentProjectName" SortField="CurrentProjectName"
|
||||||
FieldType="String" HeaderText="当前所在项目" HeaderTextAlign="Center" TextAlign="Left">
|
FieldType="String" HeaderText="当前所在项目" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="130px" ColumnID="CurrentProjectWorkPostName" DataField="CurrentProjectWorkPostName"
|
<f:RenderField Width="130px" ColumnID="CurrentProjectWorkPostName" DataField="CurrentProjectWorkPostName"
|
||||||
FieldType="String" HeaderText="当前项目岗位" HeaderTextAlign="Center" TextAlign="Left">
|
FieldType="String" HeaderText="当前项目岗位" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
<f:RenderField Width="100px" ColumnID="WorkPost" DataField="WorkPost" FieldType="String"
|
<%-- <f:RenderField Width="100px" ColumnID="WorkPost" DataField="WorkPost" FieldType="String"
|
||||||
HeaderText="拟聘岗位" HeaderTextAlign="Center">
|
HeaderText="拟聘岗位" HeaderTextAlign="Center">
|
||||||
<Editor>
|
<Editor>
|
||||||
<f:DropDownList ID="drpWP" Required="true" runat="server">
|
<f:DropDownList ID="drpWP" Required="true" runat="server">
|
||||||
</f:DropDownList>
|
</f:DropDownList>
|
||||||
</Editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
<Listeners>
|
||||||
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
</Listeners>
|
||||||
<PageItems>
|
<PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||||
</f:ToolbarSeparator>
|
</f:ToolbarSeparator>
|
||||||
|
|
@ -112,12 +115,34 @@
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="查看历史记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="员工信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1000px" OnClose="Window1_Close"
|
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="1200px" Maximized="true"
|
||||||
Height="560px">
|
Height="620px" OnClose="Window1_Close">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
|
<f:Menu ID="Menu1" runat="server">
|
||||||
|
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||||
|
Hidden="true" runat="server" Text="编辑" Icon="Pencil">
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDispatch" OnClick="btnMenuDispatch_Click" EnablePostBack="true"
|
||||||
|
Hidden="true" runat="server" Text="派遣" Icon="TableEdit">
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||||
|
Hidden="true" ConfirmText="确定删除选中行?" ConfirmTarget="Parent" runat="server"
|
||||||
|
Icon="Delete" Text="删除">
|
||||||
|
</f:MenuButton>
|
||||||
|
<f:MenuButton ID="btnSee" OnClick="btnSee_Click" EnablePostBack="true"
|
||||||
|
runat="server" Text="查看" Icon="Find">
|
||||||
|
</f:MenuButton>
|
||||||
|
</f:Menu>
|
||||||
</form>
|
</form>
|
||||||
<script type="text/jscript">
|
<script type="text/jscript">
|
||||||
|
var menuID = '<%= Menu1.ClientID %>';
|
||||||
|
// 返回false,来阻止浏览器右键菜单
|
||||||
|
function onRowContextMenu(event, rowId) {
|
||||||
|
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function reloadGrid() {
|
function reloadGrid() {
|
||||||
__doPostBack(null, 'reloadGrid');
|
__doPostBack(null, 'reloadGrid');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,15 +22,14 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
Funs.DropDownPageSize(this.ddlPageSize);
|
Funs.DropDownPageSize(this.ddlPageSize);
|
||||||
|
|
||||||
BLL.ProjectService.InitProjectDropDownList(this.drpProject, false);
|
this.btnNew.OnClientClick = Window1.GetShowReference("PersonEdit.aspx?Type=Shunt&UnitId=" + Const.UnitId_SEDIN + "&DepartId=" + Const.Depart_constructionId) + "return false;";
|
||||||
Funs.FineUIPleaseSelect(this.drpProject, "请选择拟聘项目");
|
|
||||||
|
|
||||||
////权限按钮方法
|
////权限按钮方法
|
||||||
this.GetButtonPower();
|
this.GetButtonPower();
|
||||||
WorkPostService.InitWorkPostNameByTypeDropDownList2(this.drpWorkPost, "1", false); //加载管理岗位
|
WorkPostService.InitWorkPostNameByTypeDropDownList2(this.drpWorkPost, "1", false); //加载管理岗位
|
||||||
Funs.FineUIPleaseSelect(this.drpWorkPost, "请选择岗位");
|
Funs.FineUIPleaseSelect(this.drpWorkPost, "请选择岗位");
|
||||||
|
|
||||||
WorkPostService.InitWorkPostNameByTypeDropDownList(this.drpWP, "1", true); //加载管理岗位
|
//WorkPostService.InitWorkPostNameByTypeDropDownList(this.drpWP, "1", true); //加载管理岗位
|
||||||
|
|
||||||
PostTitleService.InitPostTitleDropDownList(this.drpPostTitle, false);
|
PostTitleService.InitPostTitleDropDownList(this.drpPostTitle, false);
|
||||||
Funs.FineUIPleaseSelect(this.drpPostTitle, "请选择职称");
|
Funs.FineUIPleaseSelect(this.drpPostTitle, "请选择职称");
|
||||||
|
|
@ -75,56 +74,27 @@ namespace FineUIPro.Web.Person
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private void GetButtonPower()
|
private void GetButtonPower()
|
||||||
{
|
{
|
||||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DepartPersonShuntMenuId);
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DepartPersonShuntMenuId);
|
||||||
if (buttonList.Count() > 0)
|
if (buttonList.Count() > 0)
|
||||||
{
|
{
|
||||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||||
{
|
{
|
||||||
this.btnSure.Hidden = false;
|
this.btnNew.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||||
}
|
{
|
||||||
#endregion
|
this.btnMenuEdit.Hidden = false;
|
||||||
|
this.btnMenuDispatch.Hidden = false;
|
||||||
#region 删除数据
|
}
|
||||||
/// <summary>
|
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||||
/// 右键删除事件
|
{
|
||||||
/// </summary>
|
this.btnMenuDelete.Hidden = false;
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
this.DeleteData();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除方法
|
|
||||||
/// </summary>
|
|
||||||
private void DeleteData()
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
|
||||||
{
|
|
||||||
string strShowNotify = string.Empty;
|
|
||||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
|
||||||
{
|
|
||||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
|
||||||
BLL.Person_ShuntDetailService.DeleteShuntDetailByShuntId(rowID);
|
|
||||||
BLL.Person_ShuntApproveService.DeleteShuntApprovesByShuntId(rowID);
|
|
||||||
BLL.Person_ShuntService.DeleteShunt(rowID);
|
|
||||||
}
|
|
||||||
BindGrid();
|
|
||||||
if (!string.IsNullOrEmpty(strShowNotify))
|
|
||||||
{
|
|
||||||
Alert.ShowInTop(strShowNotify, MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关闭弹出窗
|
/// 关闭弹出窗
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -168,140 +138,6 @@ namespace FineUIPro.Web.Person
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 确定按钮事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnSure_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (this.drpProject.SelectedValue != BLL.Const._Null)
|
|
||||||
{
|
|
||||||
bool b = true;
|
|
||||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
|
||||||
{
|
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
|
||||||
int i = mergedRow.Value<int>("index");
|
|
||||||
if (this.Grid1.SelectedRowIndexArray.Contains(i))
|
|
||||||
{
|
|
||||||
AspNet.CheckBox cb = (AspNet.CheckBox)(this.Grid1.Rows[i].FindControl("cbSelect"));
|
|
||||||
if (cb.Checked) //选择项
|
|
||||||
{
|
|
||||||
string workPost = values.Value<string>("WorkPost");
|
|
||||||
if (string.IsNullOrEmpty(workPost))
|
|
||||||
{
|
|
||||||
b = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("勾选人员的拟聘岗位不能为空!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Model.Person_Shunt shunt = new Model.Person_Shunt();
|
|
||||||
shunt.Code = BLL.SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Person_Shunt", "Code", string.Empty);
|
|
||||||
shunt.ProjectId = this.drpProject.SelectedValue;
|
|
||||||
shunt.State = BLL.Const.Shunt_Complete;
|
|
||||||
shunt.CompileDate = DateTime.Now;
|
|
||||||
shunt.CompileMan = this.CurrUser.PersonId;
|
|
||||||
shunt.ShuntId = SQLHelper.GetNewID();
|
|
||||||
BLL.Person_ShuntService.AddShunt(shunt);
|
|
||||||
|
|
||||||
var workPosts = BLL.WorkPostService.GetWorkPostList();
|
|
||||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
|
||||||
{
|
|
||||||
JObject values = mergedRow.Value<JObject>("values");
|
|
||||||
int i = mergedRow.Value<int>("index");
|
|
||||||
AspNet.CheckBox cb = (AspNet.CheckBox)(this.Grid1.Rows[i].FindControl("cbSelect"));
|
|
||||||
if (cb.Checked) //选择项
|
|
||||||
{
|
|
||||||
Model.Person_ShuntDetail detail = new Model.Person_ShuntDetail();
|
|
||||||
detail.ShuntDetailId = SQLHelper.GetNewID(typeof(Model.Person_ShuntDetail));
|
|
||||||
detail.ShuntId = shunt.ShuntId;
|
|
||||||
detail.UserId = this.Grid1.Rows[i].RowID;
|
|
||||||
string workPost = values.Value<string>("WorkPost");
|
|
||||||
var w = workPosts.FirstOrDefault(x => x.WorkPostName == workPost);
|
|
||||||
if (w != null)
|
|
||||||
{
|
|
||||||
detail.WorkPostId = w.WorkPostId;
|
|
||||||
}
|
|
||||||
detail.SortIndex = i;
|
|
||||||
BLL.Person_ShuntDetailService.AddShuntDetail(detail);
|
|
||||||
|
|
||||||
/////todo 修改人员注释掉的 后续优化
|
|
||||||
//var currProjectUser = BLL.ProjectUserService.GetCurrProjectUserByUserId(detail.UserId);
|
|
||||||
//if (currProjectUser != null)
|
|
||||||
//{
|
|
||||||
// currProjectUser.IsPost = false;
|
|
||||||
// BLL.ProjectUserService.UpdateProjectUser(currProjectUser);
|
|
||||||
//}
|
|
||||||
//var projectUser = BLL.ProjectUserService.GetProjectUserByUserIdProjectId(shunt.ProjectId, detail.UserId);
|
|
||||||
//if (projectUser == null)
|
|
||||||
//{
|
|
||||||
// var user = BLL.Person_PersonsService.GetPerson_PersonsById(detail.UserId);
|
|
||||||
// if (user != null)
|
|
||||||
// {
|
|
||||||
// user.ProjectId = this.drpProject.SelectedValue;
|
|
||||||
// user.ProjectWorkPostId = detail.WorkPostId;
|
|
||||||
// BLL.Person_PersonsService.UpdateUser(user);
|
|
||||||
// Model.Project_ProjectUser newProjectUser = new Model.Project_ProjectUser
|
|
||||||
// {
|
|
||||||
// ProjectId = shunt.ProjectId,
|
|
||||||
// UserId = detail.UserId,
|
|
||||||
// UnitId = user.UnitId,
|
|
||||||
// RoleId = user.RoleIds,
|
|
||||||
// IsPost = true
|
|
||||||
// };
|
|
||||||
// BLL.ProjectUserService.AddProjectUser(newProjectUser);
|
|
||||||
// Model.Sys_RoleItem roleItem = new Model.Sys_RoleItem();
|
|
||||||
// roleItem.ProjectId = shunt.ProjectId;
|
|
||||||
// roleItem.UserId = detail.UserId;
|
|
||||||
// roleItem.RoleId = user.RoleId;
|
|
||||||
// roleItem.IntoDate = DateTime.Now;
|
|
||||||
// BLL.RoleItemService.AddRoleItem(roleItem);
|
|
||||||
// if (!string.IsNullOrEmpty(user.IdentityCard))
|
|
||||||
// {
|
|
||||||
// /////当前用户是否已经添加到项目现场人员中
|
|
||||||
// //var sitePerson = BLL.Person_PersonsService.GetPerson_PersonsByIdentityCard(shunt.ProjectId, user.IdentityCard);
|
|
||||||
// //if (sitePerson == null)
|
|
||||||
// //{
|
|
||||||
// // Model.SitePerson_Person newPerson = new Model.SitePerson_Person
|
|
||||||
// // {
|
|
||||||
// // PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)),
|
|
||||||
// // PersonName = user.PersonName,
|
|
||||||
// // IdentityCard = user.IdentityCard,
|
|
||||||
// // ProjectId = shunt.ProjectId,
|
|
||||||
// // UnitId = user.UnitId,
|
|
||||||
// // WorkPostId = detail.WorkPostId,
|
|
||||||
// // };
|
|
||||||
// // BLL.PersonService.AddPerson(newPerson);
|
|
||||||
// //}
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ShowNotify("拟聘成功!", MessageBoxIcon.Success);
|
|
||||||
BindGrid();
|
|
||||||
BLL.LogService.AddSys_Log(this.CurrUser, shunt.Code, shunt.ShuntId, BLL.Const.DepartPersonShuntMenuId, "编辑分流管理");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Alert.ShowInParent("请选择拟聘项目!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 确定按钮事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void btnView_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ShuntList.aspx", "编辑 - ")));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Grid行双击事件
|
/// Grid行双击事件
|
||||||
|
|
@ -328,142 +164,95 @@ namespace FineUIPro.Web.Person
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void EditData()
|
private void EditData()
|
||||||
{
|
{
|
||||||
|
//this.PageSize = this.Grid1.PageIndex;
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
{
|
{
|
||||||
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string Id = Grid1.SelectedRowID;
|
if (this.btnMenuEdit.Hidden)
|
||||||
var shunt = BLL.Person_ShuntService.GetShunt(Id);
|
|
||||||
|
|
||||||
if (shunt != null)
|
|
||||||
{
|
{
|
||||||
if (shunt.State.Equals(Const.Shunt_Complete))
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonView.aspx?PersonId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||||
{
|
|
||||||
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Model.Person_ShuntApprove approve = BLL.Person_ShuntApproveService.GetShuntApproveByShuntId(Id);
|
|
||||||
if (approve != null)
|
|
||||||
{
|
|
||||||
if (!string.IsNullOrEmpty(approve.ApproveMan))
|
|
||||||
{
|
|
||||||
if (this.CurrUser.PersonId == approve.ApproveMan || CurrUser.PersonId == Const.sysglyId)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartPersonShuntEdit.aspx?ShuntId={0}", Id, "编辑 - ")));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (shunt.State == BLL.Const.Shunt_Complete)
|
|
||||||
{
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartPersonShuntView.aspx?ShuntId={0}", Id, "查看 - ")));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
//if (this.btnMenuModify.Hidden || checks.State == BLL.Const.State_2) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
|
||||||
//{
|
|
||||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckListView.aspx?CheckControlCode={0}", codes, "查看 - ")));
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckListEdit.aspx?CheckControlCode={0}", codes, "编辑 - ")));
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonEdit.aspx?PersonId={0}&UnitId={1}&DepartId={2}", Grid1.SelectedRowID, Const.sedinId, Const.Depart_constructionId, "编辑 - ")));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
#region 查看人员详细信息
|
||||||
|
/// <summary>
|
||||||
|
/// 查看人员详细信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnSee_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
{
|
{
|
||||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
Alert.ShowInParent("请选择一条记录!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string Id = Grid1.SelectedRowID;
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonView.aspx?PersonId={0}", Grid1.SelectedRowID, "查看 - ")));
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DepartPersonShuntView.aspx?ShuntId={0}", Id, "查看 - ")));
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 删除数据
|
||||||
|
/// <summary>
|
||||||
|
/// 右键删除事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// this.PageSize = this.Grid1.PageIndex;
|
||||||
|
this.DeleteData();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 判断是否可删除
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 判断是否可以删除
|
/// 删除方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
private void DeleteData()
|
||||||
private string judgementDelete(string id)
|
|
||||||
{
|
{
|
||||||
string content = string.Empty;
|
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||||
if (Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == id) != null)
|
|
||||||
{
|
{
|
||||||
content += "已在【项目员工】中使用,不能删除!";
|
string strShowNotify = Person_PersonsService.DeletePersons(Grid1.SelectedRowIDArray, this.CurrUser);
|
||||||
|
BindGrid();
|
||||||
|
if (!string.IsNullOrEmpty(strShowNotify))
|
||||||
|
{
|
||||||
|
Alert.ShowInTop(strShowNotify, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 关闭导入弹出窗口
|
/// 派遣
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Window2_Close(object sender, WindowCloseEventArgs e)
|
protected void btnMenuDispatch_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
BindGrid();
|
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||||
}
|
|
||||||
|
|
||||||
protected void ckbAll_CheckedChanged(object sender, CheckedEventArgs e)
|
|
||||||
{
|
|
||||||
BindGrid();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 把状态转换代号为文字形式
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="state"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
protected string ConvertState(object state)
|
|
||||||
{
|
|
||||||
if (state != null)
|
|
||||||
{
|
{
|
||||||
if (state.ToString() == BLL.Const.Shunt_ReCompile)
|
Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||||
{
|
return;
|
||||||
return "重新编制";
|
}
|
||||||
}
|
var getPerson = Person_PersonsService.GetPerson_PersonsById(Grid1.SelectedRowID);
|
||||||
else if (state.ToString() == BLL.Const.Shunt_Compile)
|
if (getPerson != null && getPerson.IsPost == true)
|
||||||
{
|
{
|
||||||
return "编制";
|
////人员直接派遣时候
|
||||||
}
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectPersonEdit.aspx?PersonId={0}&Type=P", Grid1.SelectedRowID, "查看 - ")));
|
||||||
else if (state.ToString() == BLL.Const.Shunt_Audit)
|
}
|
||||||
{
|
else
|
||||||
return "审核";
|
{
|
||||||
}
|
Alert.ShowInParent("当前人员不在职,请完善个人信息签订合同后派遣!", MessageBoxIcon.Warning);
|
||||||
else if (state.ToString() == BLL.Const.Shunt_Complete)
|
return;
|
||||||
{
|
|
||||||
return "审批完成";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -87,40 +87,22 @@ namespace FineUIPro.Web.Person
|
||||||
protected global::FineUIPro.DropDownList drpCertificate;
|
protected global::FineUIPro.DropDownList drpCertificate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpProject 控件。
|
/// btnNew 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DropDownList drpProject;
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnView 控件。
|
/// lblNumber 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnView;
|
protected global::System.Web.UI.WebControls.Label lblNumber;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnSure 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnSure;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// cbSelect 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::System.Web.UI.WebControls.CheckBox cbSelect;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// lbSex 控件。
|
/// lbSex 控件。
|
||||||
|
|
@ -149,15 +131,6 @@ namespace FineUIPro.Web.Person
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::System.Web.UI.WebControls.Label Label2;
|
protected global::System.Web.UI.WebControls.Label Label2;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// drpWP 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DropDownList drpWP;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ToolbarSeparator1 控件。
|
/// ToolbarSeparator1 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -193,5 +166,50 @@ namespace FineUIPro.Web.Person
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Window Window1;
|
protected global::FineUIPro.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Menu1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuEdit 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDispatch 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDispatch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnMenuDelete 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSee 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.MenuButton btnSee;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,8 @@
|
||||||
<f:RadioItem Value="1" Text="男" Selected="true" />
|
<f:RadioItem Value="1" Text="男" Selected="true" />
|
||||||
<f:RadioItem Value="2" Text="女" />
|
<f:RadioItem Value="2" Text="女" />
|
||||||
</f:RadioButtonList>
|
</f:RadioButtonList>
|
||||||
<f:CheckBox runat="server" ID="ckIsPost" Label="在职" Checked="true" AutoPostBack="true" OnCheckedChanged="ckIsPost_CheckedChanged"></f:CheckBox>
|
<f:CheckBox runat="server" ID="ckIsPost" Label="在职" Checked="true"
|
||||||
|
AutoPostBack="true" OnCheckedChanged="ckIsPost_CheckedChanged"></f:CheckBox>
|
||||||
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期">
|
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,20 @@ namespace FineUIPro.Web.Person
|
||||||
ViewState["SignatureUrl"] = value;
|
ViewState["SignatureUrl"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 人员分配类型 P-派遣 Shunt-分流
|
||||||
|
/// </summary>
|
||||||
|
public string Type
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["Type"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["Type"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
|
|
@ -51,6 +65,7 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
this.Type = Request.Params["Type"];
|
||||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
this.PersonId = Request.Params["PersonId"];
|
this.PersonId = Request.Params["PersonId"];
|
||||||
|
|
||||||
|
|
@ -198,6 +213,13 @@ namespace FineUIPro.Web.Person
|
||||||
this.btnInOutNew.Hidden = false;
|
this.btnInOutNew.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (this.Type == "Shunt")
|
||||||
|
{
|
||||||
|
this.ckIsPost.Checked = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getInitGridCertificate();
|
getInitGridCertificate();
|
||||||
getInitGridTrain();
|
getInitGridTrain();
|
||||||
|
|
@ -552,7 +574,7 @@ namespace FineUIPro.Web.Person
|
||||||
newPerson.IDCardBackUrl = null;
|
newPerson.IDCardBackUrl = null;
|
||||||
}
|
}
|
||||||
string info = Person_PersonsService.ValidPersonInfo(newPerson);
|
string info = Person_PersonsService.ValidPersonInfo(newPerson);
|
||||||
if (string.IsNullOrEmpty(info))
|
if (string.IsNullOrEmpty(info) || this.Type == "Shunt")
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(newPerson.PersonId))
|
if (!string.IsNullOrEmpty(newPerson.PersonId))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,11 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void ckIsTemp_CheckedChanged(object sender, CheckedEventArgs e)
|
||||||
|
{
|
||||||
|
this.BindGrid();
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取按钮权限
|
#region 获取按钮权限
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
using FastReport.Editor.Syntax;
|
using FastReport.Editor.Syntax;
|
||||||
|
using Model;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
@ -39,6 +40,20 @@ namespace FineUIPro.Web.Person
|
||||||
ViewState["SitePersonId"] = value;
|
ViewState["SitePersonId"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 人员分配类型 P-派遣 Shunt-分流
|
||||||
|
/// </summary>
|
||||||
|
public string Type
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (string)ViewState["Type"];
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["Type"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
|
|
@ -51,6 +66,7 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
this.Type = Request.Params["Type"];
|
||||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||||
ProjectService.InitProjectDropDownList(this.drpProject, true);
|
ProjectService.InitProjectDropDownList(this.drpProject, true);
|
||||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||||
|
|
@ -72,6 +88,12 @@ namespace FineUIPro.Web.Person
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.InitDropDownListProject();
|
this.InitDropDownListProject();
|
||||||
|
var getPersons = Person_PersonsService.GetPerson_PersonsById(Request.Params["PersonId"]);
|
||||||
|
if (getPersons != null)
|
||||||
|
{
|
||||||
|
SetPersonInfo(getPersons);
|
||||||
|
}
|
||||||
|
|
||||||
this.txtIdentityCard.Focus();
|
this.txtIdentityCard.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,6 +107,10 @@ namespace FineUIPro.Web.Person
|
||||||
{
|
{
|
||||||
this.btnSave.Text = "提交在审";
|
this.btnSave.Text = "提交在审";
|
||||||
}
|
}
|
||||||
|
if (this.Type == "P")
|
||||||
|
{
|
||||||
|
this.lbStates.Text = "派遣";
|
||||||
|
}
|
||||||
|
|
||||||
getInitGridCertificate();
|
getInitGridCertificate();
|
||||||
getInitGridTestRecord();
|
getInitGridTestRecord();
|
||||||
|
|
@ -130,103 +156,7 @@ namespace FineUIPro.Web.Person
|
||||||
var person = BLL.Person_PersonsService.GetPerson_PersonsByIdCard(idCard);
|
var person = BLL.Person_PersonsService.GetPerson_PersonsByIdCard(idCard);
|
||||||
if (person != null)
|
if (person != null)
|
||||||
{
|
{
|
||||||
this.PersonId = person.PersonId;
|
SetPersonInfo(person);
|
||||||
this.drpUnit.Readonly = true;
|
|
||||||
if (person.IsCardNoOK == true)
|
|
||||||
{
|
|
||||||
this.txtIdentityCard.Readonly = true;
|
|
||||||
}
|
|
||||||
#region 基本信息
|
|
||||||
this.txtPersonName.Text = person.PersonName;
|
|
||||||
this.drpUnit.SelectedValue = person.UnitId;
|
|
||||||
if (string.IsNullOrEmpty(this.drpUnit.SelectedValue))
|
|
||||||
{
|
|
||||||
string name = UnitService.GetUnitNameByUnitId(person.UnitId);
|
|
||||||
Alert.ShowInParent("当前人员所属单位【" + name + "】不在该项目单位中,请查证!", MessageBoxIcon.Warning);
|
|
||||||
}
|
|
||||||
this.txtAccount.Text = person.Account;
|
|
||||||
if (person.IsForeign.HasValue)
|
|
||||||
{
|
|
||||||
this.ckIsForeign.Checked = person.IsForeign.Value;
|
|
||||||
}
|
|
||||||
this.rbPersonType.SelectedValue = person.PersonType;
|
|
||||||
if (!string.IsNullOrEmpty(person.IdcardType))
|
|
||||||
{
|
|
||||||
this.drpIdcardType.SelectedValue = person.IdcardType;
|
|
||||||
}
|
|
||||||
this.txtIdentityCard.Text = person.IdentityCard;
|
|
||||||
this.txtIdcardAddress.Text = person.IdcardAddress;
|
|
||||||
if (!string.IsNullOrEmpty(person.IdcardForever))
|
|
||||||
{
|
|
||||||
this.rblIdcardForever.SelectedValue = person.IdcardForever;
|
|
||||||
if (person.IdcardForever == "Y")
|
|
||||||
{
|
|
||||||
this.txtIdcardEndDate.ShowRedStar = false;
|
|
||||||
this.txtIdcardEndDate.Required = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.txtIdcardStartDate.Text = string.Format("{0:yyyy-MM-dd}", person.IdcardStartDate);
|
|
||||||
this.txtIdcardEndDate.Text = string.Format("{0:yyyy-MM-dd}", person.IdcardEndDate);
|
|
||||||
if (!string.IsNullOrEmpty(person.Sex))
|
|
||||||
{
|
|
||||||
this.rblSex.SelectedValue = person.Sex;
|
|
||||||
}
|
|
||||||
if (person.Birthday.HasValue)
|
|
||||||
{
|
|
||||||
this.txtBirthday.Text = string.Format("{0:yyyy-MM-dd}", person.Birthday);
|
|
||||||
this.txtAge.Text = IDCardValid.CalculateAgeCorrect(person.Birthday.Value).ToString();
|
|
||||||
}
|
|
||||||
this.txtTelephone.Text = person.Telephone;
|
|
||||||
if (!string.IsNullOrEmpty(person.PhotoUrl))
|
|
||||||
{
|
|
||||||
imgPhoto.ImageUrl = ("~/" + person.PhotoUrl);
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
|
||||||
{
|
|
||||||
imgQR.ImageUrl = ("~/" + person.QRCodeAttachUrl);
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.IDCardUrl))
|
|
||||||
{
|
|
||||||
imgIDCard.ImageUrl = ("~/" + person.IDCardUrl);
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.IDCardBackUrl))
|
|
||||||
{
|
|
||||||
imgIDCardBack.ImageUrl = ("~/" + person.IDCardBackUrl);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 详细信息
|
|
||||||
this.txtMajor.Text = person.Major;
|
|
||||||
this.txtForeignLanguage.Text = person.ForeignLanguage;
|
|
||||||
if (!string.IsNullOrEmpty(person.CountryCode))
|
|
||||||
{
|
|
||||||
this.drpCountryCode.SelectedValue = person.CountryCode;
|
|
||||||
CityService.InitCityDropDownList(this.drpProvinceCode, person.CountryCode, false);
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.ProvinceCode))
|
|
||||||
{
|
|
||||||
this.drpProvinceCode.SelectedValue = person.ProvinceCode;
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.Nation))
|
|
||||||
{
|
|
||||||
this.drpNation.SelectedValue = person.Nation;
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.PoliticsStatus))
|
|
||||||
{
|
|
||||||
this.drpPoliticsStatus.SelectedValue = person.PoliticsStatus;
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.EduLevel))
|
|
||||||
{
|
|
||||||
this.drpEduLevel.SelectedValue = person.EduLevel;
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(person.MaritalStatus))
|
|
||||||
{
|
|
||||||
this.drpMaritalStatus.SelectedValue = person.MaritalStatus;
|
|
||||||
}
|
|
||||||
this.txtRelativeName.Text = person.RelativeName;
|
|
||||||
this.txtRelativeTel.Text = person.RelativeTel;
|
|
||||||
this.txtAddress.Text = person.Address;
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -234,6 +164,112 @@ namespace FineUIPro.Web.Person
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置人员信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="person"></param>
|
||||||
|
private void SetPersonInfo(Model.Person_Persons person)
|
||||||
|
{
|
||||||
|
this.PersonId = person.PersonId;
|
||||||
|
this.drpUnit.Readonly = true;
|
||||||
|
if (person.IsCardNoOK == true)
|
||||||
|
{
|
||||||
|
this.txtIdentityCard.Readonly = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 基本信息
|
||||||
|
this.txtPersonName.Text = person.PersonName;
|
||||||
|
this.drpUnit.SelectedValue = person.UnitId;
|
||||||
|
if (string.IsNullOrEmpty(this.drpUnit.SelectedValue))
|
||||||
|
{
|
||||||
|
string name = UnitService.GetUnitNameByUnitId(person.UnitId);
|
||||||
|
Alert.ShowInParent("当前人员所属单位【" + name + "】不在该项目单位中,请查证!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
this.txtAccount.Text = person.Account;
|
||||||
|
if (person.IsForeign.HasValue)
|
||||||
|
{
|
||||||
|
this.ckIsForeign.Checked = person.IsForeign.Value;
|
||||||
|
}
|
||||||
|
this.rbPersonType.SelectedValue = person.PersonType;
|
||||||
|
if (!string.IsNullOrEmpty(person.IdcardType))
|
||||||
|
{
|
||||||
|
this.drpIdcardType.SelectedValue = person.IdcardType;
|
||||||
|
}
|
||||||
|
this.txtIdentityCard.Text = person.IdentityCard;
|
||||||
|
this.txtIdcardAddress.Text = person.IdcardAddress;
|
||||||
|
if (!string.IsNullOrEmpty(person.IdcardForever))
|
||||||
|
{
|
||||||
|
this.rblIdcardForever.SelectedValue = person.IdcardForever;
|
||||||
|
if (person.IdcardForever == "Y")
|
||||||
|
{
|
||||||
|
this.txtIdcardEndDate.ShowRedStar = false;
|
||||||
|
this.txtIdcardEndDate.Required = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.txtIdcardStartDate.Text = string.Format("{0:yyyy-MM-dd}", person.IdcardStartDate);
|
||||||
|
this.txtIdcardEndDate.Text = string.Format("{0:yyyy-MM-dd}", person.IdcardEndDate);
|
||||||
|
if (!string.IsNullOrEmpty(person.Sex))
|
||||||
|
{
|
||||||
|
this.rblSex.SelectedValue = person.Sex;
|
||||||
|
}
|
||||||
|
if (person.Birthday.HasValue)
|
||||||
|
{
|
||||||
|
this.txtBirthday.Text = string.Format("{0:yyyy-MM-dd}", person.Birthday);
|
||||||
|
this.txtAge.Text = IDCardValid.CalculateAgeCorrect(person.Birthday.Value).ToString();
|
||||||
|
}
|
||||||
|
this.txtTelephone.Text = person.Telephone;
|
||||||
|
if (!string.IsNullOrEmpty(person.PhotoUrl))
|
||||||
|
{
|
||||||
|
imgPhoto.ImageUrl = ("~/" + person.PhotoUrl);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||||
|
{
|
||||||
|
imgQR.ImageUrl = ("~/" + person.QRCodeAttachUrl);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.IDCardUrl))
|
||||||
|
{
|
||||||
|
imgIDCard.ImageUrl = ("~/" + person.IDCardUrl);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.IDCardBackUrl))
|
||||||
|
{
|
||||||
|
imgIDCardBack.ImageUrl = ("~/" + person.IDCardBackUrl);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 详细信息
|
||||||
|
this.txtMajor.Text = person.Major;
|
||||||
|
this.txtForeignLanguage.Text = person.ForeignLanguage;
|
||||||
|
if (!string.IsNullOrEmpty(person.CountryCode))
|
||||||
|
{
|
||||||
|
this.drpCountryCode.SelectedValue = person.CountryCode;
|
||||||
|
CityService.InitCityDropDownList(this.drpProvinceCode, person.CountryCode, false);
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.ProvinceCode))
|
||||||
|
{
|
||||||
|
this.drpProvinceCode.SelectedValue = person.ProvinceCode;
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.Nation))
|
||||||
|
{
|
||||||
|
this.drpNation.SelectedValue = person.Nation;
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.PoliticsStatus))
|
||||||
|
{
|
||||||
|
this.drpPoliticsStatus.SelectedValue = person.PoliticsStatus;
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.EduLevel))
|
||||||
|
{
|
||||||
|
this.drpEduLevel.SelectedValue = person.EduLevel;
|
||||||
|
}
|
||||||
|
if (!string.IsNullOrEmpty(person.MaritalStatus))
|
||||||
|
{
|
||||||
|
this.drpMaritalStatus.SelectedValue = person.MaritalStatus;
|
||||||
|
}
|
||||||
|
this.txtRelativeName.Text = person.RelativeName;
|
||||||
|
this.txtRelativeTel.Text = person.RelativeTel;
|
||||||
|
this.txtAddress.Text = person.Address;
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 初始化项目人员信息
|
#region 初始化项目人员信息
|
||||||
|
|
@ -790,6 +826,12 @@ namespace FineUIPro.Web.Person
|
||||||
newPerson.States = Const.ProjectPersonStates_1;
|
newPerson.States = Const.ProjectPersonStates_1;
|
||||||
newPerson.AuditorDate = DateTime.Now;
|
newPerson.AuditorDate = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
if (this.Type == "P")
|
||||||
|
{
|
||||||
|
newPerson.AuditorId = newPerson.AuditorId ?? this.CurrUser.PersonId;
|
||||||
|
newPerson.States = Const.ProjectPersonStates_1;
|
||||||
|
newPerson.AuditorDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
return newPerson;
|
return newPerson;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1350
SGGL/Model/Model.cs
1350
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue