76 lines
1.8 KiB
C#
76 lines
1.8 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace NKC_WF.WebUserControls
|
|
{
|
|
public partial class cmp_MachSelSmart : BaseUserControl
|
|
{
|
|
#region Public Properties
|
|
|
|
|
|
public string MachineSel
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
answ = memLayer.ML.QSS("mach");
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
if (!string.IsNullOrEmpty(value))
|
|
{
|
|
string url = $"{currPage}?mach={value}";
|
|
Response.Redirect(url);
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Private Methods
|
|
|
|
private void checkVisibility()
|
|
{
|
|
string cssClass = "warning";
|
|
if (MachineSel == "NE01")
|
|
{
|
|
cssClass = "dark";
|
|
}
|
|
else if (MachineSel == "NE02")
|
|
{
|
|
cssClass = "primary";
|
|
}
|
|
else if (MachineSel == "NE03")
|
|
{
|
|
cssClass = "success";
|
|
}
|
|
hfMachine.Value = MachineSel;
|
|
hfMachClass.Value = cssClass;
|
|
lbtReset.Attributes.Remove("class");
|
|
lbtReset.Attributes.Add("class", $"btn btn-block text-center btn-{hfMachClass.Value}");
|
|
lbtReset.DataBind();
|
|
}
|
|
|
|
#endregion Private Methods
|
|
|
|
#region Protected Methods
|
|
|
|
protected void lbtReset_Click(object sender, EventArgs e)
|
|
{
|
|
Response.Redirect(currPage);
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
checkVisibility();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |