提交代码

This commit is contained in:
2024-03-22 17:26:57 +08:00
parent 9fcabc9f9f
commit 64c92b8284
38 changed files with 2456 additions and 51 deletions
@@ -62,6 +62,14 @@ namespace FineUIPro.Web.Personal
this.drpType.SelectedValue = standard.Type;
TestRunPerformanceStandardService.InitItemDropDownList(drpItem, this.drpType.SelectedValue, true);
this.drpItem.SelectedValue = standard.Item;
if (drpItem.SelectedItem.Text.Contains("_回路") || drpItem.SelectedItem.Text.Contains("_台"))
{
this.txtNum.Hidden = false;
if (performance.Num != null)
{
this.txtNum.Text = performance.Num.ToString();
}
}
TestRunPerformanceStandardService.InitUnitDropDownList(drpUnit, this.drpType.SelectedValue, this.drpItem.SelectedValue, true);
this.drpUnit.SelectedValue = standard.TestRunPerformanceStandardId;
}
@@ -123,6 +131,7 @@ namespace FineUIPro.Web.Personal
JobContent = this.txtJobContent.Text.Trim(),
TestRunPerformanceStandardId = this.drpUnit.SelectedValue,
Days = Funs.GetNewInt(this.txtDays.Text.Trim()),
Num = Funs.GetNewInt(this.txtNum.Text.Trim()),
};
if (!string.IsNullOrEmpty(this.TestRunPerformanceId))
{
@@ -160,21 +169,34 @@ namespace FineUIPro.Web.Personal
Funs.FineUIPleaseSelect(this.drpUnit);
this.drpUnit.SelectedIndex = 0;
}
this.txtDays.Text = string.Empty;
this.txtNum.Hidden = true;
}
protected void drpItem_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpItem.SelectedValue != BLL.Const._Null)
{
TestRunPerformanceStandardService.InitUnitDropDownList(drpUnit, this.drpType.SelectedValue,this.drpItem.SelectedValue, true);
TestRunPerformanceStandardService.InitUnitDropDownList(drpUnit, this.drpType.SelectedValue, this.drpItem.SelectedValue, true);
this.drpUnit.SelectedIndex = 0;
if (drpItem.SelectedItem.Text.Contains("_回路") || drpItem.SelectedItem.Text.Contains("_台"))
{
this.txtNum.Hidden = false;
this.txtNum.Text = "1";
}
else
{
this.txtNum.Hidden = true;
}
}
else
{
{
this.txtNum.Hidden = true;
this.drpUnit.Items.Clear();
Funs.FineUIPleaseSelect(this.drpUnit);
this.drpUnit.SelectedIndex = 0;
}
this.txtDays.Text = string.Empty;
}
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
@@ -186,7 +208,14 @@ namespace FineUIPro.Web.Personal
{
if (standard.Days != null)
{
this.txtDays.Text = standard.Days.ToString();
if (this.txtNum.Hidden == true)
{
this.txtDays.Text = standard.Days.ToString();
}
else
{
this.txtDays.Text = (standard.Days * Funs.GetNewIntOrZero(this.txtNum.Text.Trim())).ToString();
}
if (standard.Days > 0)
{
this.txtDays.Readonly = true;
@@ -204,5 +233,52 @@ namespace FineUIPro.Web.Personal
this.txtDays.Readonly = true;
}
}
protected void btnSelect_Click(object sender, EventArgs e)
{
string window = String.Format("ShowTestRunPerformanceStandard.aspx", "查找 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(hdItemsString.ClientID) + Window1.GetShowReference(window));
}
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
if (!string.IsNullOrEmpty(hdItemsString.Text))
{
Model.Base_TestRunPerformanceStandard standard = BLL.TestRunPerformanceStandardService.GetPerformanceStandardById(hdItemsString.Text);
if (standard != null)
{
this.drpType.SelectedValue = standard.Type;
TestRunPerformanceStandardService.InitItemDropDownList(drpItem, this.drpType.SelectedValue, true);
this.drpItem.SelectedValue = standard.Item;
if (drpItem.SelectedItem.Text.Contains("_回路") || drpItem.SelectedItem.Text.Contains("_台"))
{
this.txtNum.Hidden = false;
this.txtNum.Text = "1";
}
else
{
this.txtNum.Hidden = true;
}
TestRunPerformanceStandardService.InitUnitDropDownList(drpUnit, this.drpType.SelectedValue, this.drpItem.SelectedValue, true);
this.drpUnit.SelectedValue = standard.TestRunPerformanceStandardId;
this.txtDays.Text = standard.Days.ToString();
if (standard.Days > 0)
{
this.txtDays.Readonly = true;
}
else
{
this.txtDays.Readonly = false;
}
}
}
}
#endregion
}
}