SGGL_SHJ/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs

98 lines
2.8 KiB
C#

using BLL;
using System;
using System.Data;
using System.Linq;
namespace FineUIPro.Web.DigData
{
public partial class WBSDW : PageBase
{
/// <summary>
/// 主键
/// </summary>
public string WorkPackageCode
{
get
{
return (string)ViewState["WorkPackageCode"];
}
set
{
ViewState["WorkPackageCode"] = value;
}
}
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
////权限按钮方法
this.ucTree.WorkPackageCode = this.WorkPackageCode;
}
}
protected void changeTree(object sender, EventArgs e)
{
this.WorkPackageCode = this.ucTree.WorkPackageCode;
//新增UnitId
//this.UnitId = this.ucTree.UnitId;
////判断 当有WorkPackageCode的时候单位id为空
//if (!string.IsNullOrEmpty(this.WorkPackageCode))
//{
// this.UnitId = "";
//}
// this.BindGrid();
initControlItem();
}
protected void ckType_SelectedIndexChanged(object sender, EventArgs e)
{
this.gpHSSE.Hidden = true;
this.gpCQMS.Hidden = true;
this.gpJDGL.Hidden = true;
this.gpHTGL.Hidden = true;
this.gpLW.Hidden = true;
foreach (var item in this.ckType.SelectedValueArray)
{
if (item == "HSSE")
{
this.gpHSSE.Hidden = false;
}
if (item == "CQMS")
{
this.gpCQMS.Hidden = false;
}
if (item == "JDGL")
{
this.gpJDGL.Hidden = false;
}
if (item == "HTGL")
{
this.gpHTGL.Hidden = false;
}
if (item == "LW")
{
this.gpLW.Hidden = false;
}
}
}
/// <summary>
/// 加载工作包
/// </summary>
protected void initControlItem()
{
var getControlItem = from x in Funs.DB.WBS_ControlItemInit where x.WorkPackageCode == this.WorkPackageCode select x;
cblControlItem.DataValueField = "ControlItemCode";
cblControlItem.DataTextField = "ControlItemContent";
cblControlItem.DataSource = getControlItem;
cblControlItem.DataBind();
}
}
}