116 lines
2.2 KiB
C#
116 lines
2.2 KiB
C#
using System;
|
|
|
|
namespace NKC_WF.WebUserControls
|
|
{
|
|
public partial class cmp_ML_ShDet : BaseUserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public int StatusReqStart
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfStatus.Value, out answ);
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
hfStatus.Value = value.ToString();
|
|
// update generale
|
|
doUpdate();
|
|
}
|
|
}
|
|
public int StatusReqEnd
|
|
{
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfStatusEnd.Value, out answ);
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
hfStatusEnd.Value = value.ToString();
|
|
// update generale
|
|
doUpdate();
|
|
}
|
|
}
|
|
public int BatchId
|
|
{
|
|
set
|
|
{
|
|
hfBatchID.Value = value.ToString();
|
|
doUpdate();
|
|
}
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfBatchID.Value, out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
public string getCss(object _status)
|
|
{
|
|
string answ = "";
|
|
int status = -10;
|
|
int.TryParse(_status.ToString(), out status);
|
|
string colore = "dark";
|
|
switch (status)
|
|
{
|
|
case -1:
|
|
colore = "primary";
|
|
break;
|
|
case 1:
|
|
colore = "warning";
|
|
break;
|
|
case 3:
|
|
colore = "info";
|
|
break;
|
|
case 5:
|
|
colore = "dark";
|
|
break;
|
|
default:
|
|
colore = "secondary";
|
|
break;
|
|
}
|
|
answ = $"alert-{colore} border border-{colore}";
|
|
return answ;
|
|
}
|
|
|
|
public void doUpdate()
|
|
{
|
|
// sistemo filtraggio frmView
|
|
}
|
|
|
|
public string getTitle(object _status)
|
|
{
|
|
string answ = "";
|
|
int status = -10;
|
|
int.TryParse(_status.ToString(), out status);
|
|
switch (status)
|
|
{
|
|
case -1:
|
|
answ = traduci("LoadData");
|
|
break;
|
|
case 1:
|
|
answ = traduci("PrintData");
|
|
break;
|
|
case 3:
|
|
answ = traduci("MachineData");
|
|
break;
|
|
case 5:
|
|
answ = traduci("UnloadData");
|
|
break;
|
|
default:
|
|
answ = traduci("NA");
|
|
break;
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
} |