20230907
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="ckState" Width="350px" AutoColumnWidth="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="ckState_SelectedIndexChanged">
|
||||
<f:RadioButtonList runat="server" ID="ckLevel" Width="350px" AutoColumnWidth="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="ckLevel_SelectedIndexChanged">
|
||||
<f:RadioItem Text="全部" Value="-1" Selected="true"/>
|
||||
<f:RadioItem Text="0级" Value="0" />
|
||||
<f:RadioItem Text="1级" Value="1" />
|
||||
|
||||
@@ -19,6 +19,25 @@ namespace FineUIPro.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public string Level
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Level"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Level"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsShowAll
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = true;
|
||||
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
@@ -29,8 +48,15 @@ namespace FineUIPro.Web.Controls
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (!IsShowAll)
|
||||
{
|
||||
this.ckLevel.Items.Remove(this.ckLevel.Items[0]);
|
||||
this.ckLevel.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
////加载树
|
||||
SetSubUnitProjectTree(this.trWBS);
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -42,6 +68,7 @@ namespace FineUIPro.Web.Controls
|
||||
/// <param name="e"></param>
|
||||
protected void trWBS_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
this.Level = this.ckLevel.SelectedValue;
|
||||
if (this.trWBS != null && !string.IsNullOrEmpty(this.trWBS.SelectedNodeID))
|
||||
{
|
||||
this.WorkPackageCode = this.trWBS.SelectedNodeID;
|
||||
@@ -52,6 +79,21 @@ namespace FineUIPro.Web.Controls
|
||||
}
|
||||
}
|
||||
|
||||
protected void ckLevel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Level = this.ckLevel.SelectedValue;
|
||||
if (this.trWBS != null && !string.IsNullOrEmpty(this.trWBS.SelectedNodeID))
|
||||
{
|
||||
this.WorkPackageCode = this.trWBS.SelectedNodeID;
|
||||
}
|
||||
////加载树
|
||||
SetSubUnitProjectTree(this.trWBS);
|
||||
if (this.change != null)
|
||||
{
|
||||
this.change(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void userEvent(object sender, EventArgs arg);
|
||||
|
||||
public event userEvent change;
|
||||
@@ -153,11 +195,5 @@ namespace FineUIPro.Web.Controls
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void ckState_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
////加载树
|
||||
SetSubUnitProjectTree(this.trWBS);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -33,13 +33,13 @@ namespace FineUIPro.Web.Controls
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// ckState 控件。
|
||||
/// ckLevel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList ckState;
|
||||
protected global::FineUIPro.RadioButtonList ckLevel;
|
||||
|
||||
/// <summary>
|
||||
/// trWBS 控件。
|
||||
|
||||
Reference in New Issue
Block a user