ZHJA_HJGL/HJGL_ZH/FineUIPro.Web/common/BaseInfo/OrganizationChart.aspx.cs

87 lines
3.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.common.BaseInfo
{
public partial class OrganizationChart : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string projectId = Request.Params["ProjectId"];
Model.Base_Project project = BLL.Base_ProjectService.GetProjectByProjectId(projectId);
if (project != null)
{
this.lblProject.Text = "<br>项目经理:" + project.ProjectPrincipal + "<br><br>项目副经理:" + project.ProjectManager;
this.lblSecurePrincipal.Text = "<br>项目HSE经理" + project.SecurePrincipal;
this.lblPrincipal.Text = "<br>控制经理: " + "<br><br>控制副经理:" + "<br><br>设计经理:" + "<br><br>采购经理:"
+ "<br><br>开车经理:" + "<br><br>行政经理:" + "<br><br>财务经理:" ;
this.lblCN.Text = "<br>施工经理:" + "<br><br>施工副经理:";
this.lblMaterialPrincipal.Text = "<br>现场HSE经理";
}
}
}
/// <summary>
/// 业主HSE管理机构
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOrganization1_Click(object sender, EventArgs e)
{
string projectId = Request.Params["ProjectId"];
var unit = BLL.Base_UnitService.GetUnitsByProjectUnitType(projectId, BLL.Const.UnitType_1);
if (unit.Count() > 0)
{
Response.Redirect("OrganizationParticular.aspx?unitType=" + BLL.Const.UnitType_1);
}
else
{
ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('业主类型的单位不存在!')", true);
}
}
/// <summary>
/// 监理HSE管理机构
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOrganization2_Click(object sender, EventArgs e)
{
string projectId = Request.Params["ProjectId"];
var unit = BLL.Base_UnitService.GetUnitsByProjectUnitType(projectId, BLL.Const.UnitType_2);
if (unit.Count() > 0)
{
Response.Redirect("OrganizationParticular.aspx?unitType="+ BLL.Const.UnitType_1);
}
else
{
ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('监理类型的单位不存在!')", true);
}
}
/// <summary>
/// 分包方HSE管理机构
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOrganization3_Click(object sender, EventArgs e)
{
string projectId = Request.Params["ProjectId"];
var unit = BLL.Base_UnitService.GetUnitsByProjectUnitType(projectId, BLL.Const.UnitType_3);
if (unit.Count() > 0)
{
Response.Redirect("OrganizationParticular.aspx?unitType=" + BLL.Const.UnitType_3);
}
else
{
ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('分包方类型的单位不存在!')", true);
}
}
}
}