diff --git a/SGGL/BLL/DropListService.cs b/SGGL/BLL/DropListService.cs index 58e2f0dc..6911bff9 100644 --- a/SGGL/BLL/DropListService.cs +++ b/SGGL/BLL/DropListService.cs @@ -138,8 +138,8 @@ public static ListItem[] IsPostDropList() { ListItem[] lis = new ListItem[2]; - lis[0] = new ListItem("在岗", BLL.Const._True); - lis[1] = new ListItem("离岗", BLL.Const._False); + lis[0] = new ListItem("在职", BLL.Const._True); + lis[1] = new ListItem("离职", BLL.Const._False); return lis; } #endregion diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index d042a35c..5d1e45ca 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -112,9 +112,9 @@ namespace BLL x.RoleIds, RoleName = RoleService.getRoleNamesRoleIds(x.RoleIds), x.CurrentProjectId, - CurrentProjectName = db.Base_Project.First(u => u.ProjectId == x.CurrentProjectId).ShortName, + CurrentProjectName = getCurrentProjectName(x.PersonId), x.CurrentProjectWorkPostId, - CurrentProjectWorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.CurrentProjectWorkPostId), + CurrentProjectWorkPostName = getCurrentProjectWorkPostName(x.PersonId), IsPost = x.IsPost ?? true, x.SignatureUrl, x.Address, @@ -139,7 +139,47 @@ namespace BLL }; } #endregion - + + #region 获取当前项目及岗位 + /// + /// + /// + /// + /// + /// + public static string getCurrentProjectName(string PersonId) + { + var getItem = Funs.DB.SitePerson_PersonItem.FirstOrDefault(u => u.PersonId == PersonId && !u.OutTime.HasValue); + if (getItem != null) + { + return ProjectService.GetShortNameByProjectId(getItem.ProjectId); + } + else + { + return null; + } + } + + /// + /// + /// + /// + /// + /// + public static string getCurrentProjectWorkPostName( string PersonId) + { + var getItem = Funs.DB.SitePerson_PersonItem.FirstOrDefault(u => u.PersonId == PersonId && !u.OutTime.HasValue); + if (getItem != null) + { + return WorkPostService.getWorkPostNamesWorkPostIds(getItem.WorkPostId); + } + else + { + return null; + } + } + #endregion + #region 根据主键获取人员信息 /// /// 根据主键获取人员信息 diff --git a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx index 2cd9fee5..f996ce72 100644 --- a/SGGL/FineUIPro.Web/Person/DepartPerson.aspx +++ b/SGGL/FineUIPro.Web/Person/DepartPerson.aspx @@ -95,9 +95,9 @@ - + - + + //public int? PageSize + //{ + // get + // { + // return (int?)ViewState["PageSize"]; + // } + // set + // { + // ViewState["PageSize"] = value; + // } + //} + /// /// 加载页面 /// @@ -93,6 +108,10 @@ namespace FineUIPro.Web.Person protected void btSearch_Click(object sender, EventArgs e) { this.BindGrid(); + //if (this.PageSize.HasValue) + //{ + // this.ddlPageSize.SelectedValue = this.PageSize.ToString(); + //} } #endregion @@ -132,6 +151,7 @@ namespace FineUIPro.Web.Person /// protected void btnMenuDelete_Click(object sender, EventArgs e) { + // this.PageSize = this.Grid1.PageIndex; this.DeleteData(); } @@ -214,6 +234,7 @@ namespace FineUIPro.Web.Person /// private void EditData() { + //this.PageSize = this.Grid1.PageIndex; if (Grid1.SelectedRowIndexArray.Length == 0) { Alert.ShowInParent("请至少选择一条记录!", MessageBoxIcon.Warning); @@ -276,5 +297,10 @@ namespace FineUIPro.Web.Person Response.End(); } #endregion + + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs index 4e0ec9dc..e4ccea2a 100644 --- a/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/PersonEdit.aspx.cs @@ -566,7 +566,7 @@ namespace FineUIPro.Web.Person LogService.AddSys_Log(this.CurrUser, newPerson.PersonName, newPerson.PersonId, BLL.Const.PersonLibMenuId, BLL.Const.BtnAdd); } Alert.ShowInParent("保存成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } else { diff --git a/SGGL/FineUIPro.Web/Person/PersonLib.aspx b/SGGL/FineUIPro.Web/Person/PersonLib.aspx index 1ad29ec4..9e3a6d6f 100644 --- a/SGGL/FineUIPro.Web/Person/PersonLib.aspx +++ b/SGGL/FineUIPro.Web/Person/PersonLib.aspx @@ -88,7 +88,7 @@ - + diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx index 1dfbca62..7aa6aab7 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx +++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx @@ -50,7 +50,7 @@ - + @@ -138,7 +138,7 @@