This commit is contained in:
geh 2025-05-07 09:17:16 +08:00
parent 73f0842b7c
commit 85cf9b1dac
3 changed files with 18 additions and 10 deletions

View File

@ -25,7 +25,9 @@
<f:RadioItem Text="多选题" Value="2" />
<f:RadioItem Text="判断题" Value="3" />
</f:RadioButtonList>
<f:Label runat="server" ID="lbScore" Label="分值"></f:Label>
<%-- <f:Label runat="server" ID="lbScore" Label="分值"></f:Label> --%>
<f:TextBox ID="lbScore" runat="server" Label="分值" MaxLength="10" ShowRedStar="true" Required="true">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>

View File

@ -131,18 +131,19 @@ namespace FineUIPro.Web.HSSE.EduTrain
if (!string.IsNullOrEmpty(q.TestType))
{
this.rblTestType.SelectedValue = q.TestType;
this.lbScore.Text = q.Score.ToString();
if (q.TestType == "1")
{
this.lbScore.Text = SValue.ToString();
// this.lbScore.Text = SValue.ToString();
this.trE.Hidden = true;
}
else if (q.TestType == "2")
{
this.lbScore.Text = MValue.ToString();
// this.lbScore.Text = MValue.ToString();
}
else if (q.TestType == "3")
{
this.lbScore.Text = JValue.ToString();
// this.lbScore.Text = JValue.ToString();
this.trC.Hidden = true;
this.trD.Hidden = true;
this.trE.Hidden = true;
@ -183,7 +184,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
}
else
{
this.lbScore.Text = SValue.ToString();
// this.lbScore.Text = SValue.ToString();
this.trE.Hidden = true;
}
}
@ -241,6 +242,11 @@ namespace FineUIPro.Web.HSSE.EduTrain
AttachUrl = this.AttachUrl,
};
if (!string.IsNullOrEmpty(lbScore.Text.Trim()))
{
trainingItem.Score = int.Parse(lbScore.Text.Trim());
}
if (!string.IsNullOrEmpty(DropDownBox1.Text))
{
trainingItem.WorkPostIds = String.Join(",", DropDownBox1.Values);
@ -370,16 +376,16 @@ namespace FineUIPro.Web.HSSE.EduTrain
if (testType == "1")
{
this.lbScore.Text = SValue.ToString();
// this.lbScore.Text = SValue.ToString();
this.trE.Hidden = true;
}
else if (testType == "2")
{
this.lbScore.Text = MValue.ToString();
// this.lbScore.Text = MValue.ToString();
}
else if (testType == "3")
{
this.lbScore.Text = JValue.ToString();
// this.lbScore.Text = JValue.ToString();
this.trC.Hidden = true;
this.trD.Hidden = true;
this.trE.Hidden = true;

View File

@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
@ -66,7 +66,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbScore;
protected global::FineUIPro.TextBox lbScore;
/// <summary>
/// DropDownBox1 控件。