人员管理-人员信息下菜单补充公司级树
This commit is contained in:
@@ -51,17 +51,24 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Funs.DropDownPageSize(this.ddlPageSize);
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.ProjectId)
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.panelLeftRegion1.Hidden = true;
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
}
|
||||
|
||||
this.btnMenuDelete.OnClientClick = Grid1.GetNoSelectionAlertReference("请至少选择一项!");
|
||||
this.btnMenuDelete.ConfirmText = String.Format("你确定要删除选中的 <b><script>{0}</script></b> 行数据吗?", Grid1.GetSelectedCountReference());
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
@@ -70,6 +77,22 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
this.InitTreeMenu();
|
||||
this.BindGrid();
|
||||
this.GetButtonPower();
|
||||
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
btnNew.Hidden = true;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
@@ -168,6 +191,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
if (this.tvProjectAndUnit != null && !string.IsNullOrEmpty(this.tvProjectAndUnit.SelectedNodeID))
|
||||
@@ -184,9 +212,9 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
|
||||
string strSql = "select * from View_SitePerson_Person Where ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>
|
||||
{
|
||||
new SqlParameter("@ProjectId", this.ProjectId)
|
||||
};
|
||||
{
|
||||
new SqlParameter("@ProjectId", this.ProjectId)
|
||||
};
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
|
||||
{
|
||||
strSql += " AND UnitId =@UnitId ";
|
||||
@@ -518,7 +546,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PersonListMenuId);
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.PersonListMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
@@ -563,7 +591,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
// Alert.ShowInTop("请选择单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PersonIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - ")));
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PersonIn.aspx?ProjectId={0}", this.ProjectId, "导入 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -625,7 +653,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
if (column.ColumnID == "tfI")
|
||||
{
|
||||
html = (row.FindControl("lbI") as AspNet.Label).Text;
|
||||
html = (row.FindControl("lbI") as AspNet.Label).Text;
|
||||
}
|
||||
//sb.AppendFormat("<td>{0}</td>", html);
|
||||
sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;width:140px;'>{0}</td>", html);
|
||||
@@ -648,9 +676,9 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
/// <param name="e"></param>
|
||||
protected void btnPersonOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PersonOut.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "批量出场 - ")));
|
||||
}
|
||||
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PersonOut.aspx?ProjectId={0}", this.ProjectId, "批量出场 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量单位转换
|
||||
/// </summary>
|
||||
@@ -689,8 +717,8 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 批量生成二维码
|
||||
/// </summary>
|
||||
@@ -699,14 +727,14 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
protected void btnQR_Click(object sender, EventArgs e)
|
||||
{
|
||||
var getPersons = from x in Funs.DB.SitePerson_Person
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.IdentityCard != null && x.QRCodeAttachUrl == null
|
||||
where x.ProjectId == this.ProjectId && x.IdentityCard != null && x.QRCodeAttachUrl == null
|
||||
select x;
|
||||
int num = 0;
|
||||
if (getPersons.Count() > 0)
|
||||
{
|
||||
foreach (var item in getPersons)
|
||||
{
|
||||
string url = CreateQRCodeService.CreateCode_Simple("person$" + item.IdentityCard);
|
||||
string url = CreateQRCodeService.CreateCode_Simple("person$" + item.IdentityCard);
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
item.QRCodeAttachUrl = url;
|
||||
@@ -715,7 +743,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
||||
}
|
||||
}
|
||||
}
|
||||
ShowNotify("操作完成,新生成二维码"+ num.ToString()+"条", MessageBoxIcon.Success);
|
||||
ShowNotify("操作完成,新生成二维码" + num.ToString() + "条", MessageBoxIcon.Success);
|
||||
}
|
||||
/// <summary>
|
||||
/// 年龄
|
||||
|
||||
Reference in New Issue
Block a user