Update visualizzazione temperature con warning
This commit is contained in:
@@ -12,47 +12,21 @@ namespace GPW_Commesse
|
||||
{
|
||||
public class BaseUserControl : System.Web.UI.UserControl
|
||||
{
|
||||
#region Public Events
|
||||
|
||||
/// <summary>
|
||||
/// Evento cancel
|
||||
/// </summary>
|
||||
public event EventHandler ehCancel;
|
||||
|
||||
/// <summary>
|
||||
/// Evento save
|
||||
/// </summary>
|
||||
public event EventHandler ehSave;
|
||||
/// <summary>
|
||||
/// Sollevo evento cancel
|
||||
/// </summary>
|
||||
protected void raiseCancel()
|
||||
{
|
||||
if (ehCancel != null)
|
||||
{
|
||||
ehCancel(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sollevo evento save
|
||||
/// </summary>
|
||||
protected void raiseSave()
|
||||
{
|
||||
if (ehSave != null)
|
||||
{
|
||||
ehSave(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se il valore sia > 0
|
||||
/// </summary>
|
||||
/// <param name="_valore"></param>
|
||||
/// <returns></returns>
|
||||
public bool gtZero(object _valore)
|
||||
{
|
||||
bool answ = false;
|
||||
decimal valore = 0;
|
||||
decimal.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore > 0;
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// idxDipendente in sessione
|
||||
@@ -69,5 +43,87 @@ namespace GPW_Commesse
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento cancel
|
||||
/// </summary>
|
||||
protected void raiseCancel()
|
||||
{
|
||||
if (ehCancel != null)
|
||||
{
|
||||
ehCancel(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sollevo evento save
|
||||
/// </summary>
|
||||
protected void raiseSave()
|
||||
{
|
||||
if (ehSave != null)
|
||||
{
|
||||
ehSave(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se il valore sia > limitValue
|
||||
/// </summary>
|
||||
/// <param name="_valore"></param>
|
||||
/// <param name="minVal"></param>
|
||||
/// <param name="maxVal"></param>
|
||||
/// <returns></returns>
|
||||
public bool betweenVal(object _valore, double minVal, double maxVal)
|
||||
{
|
||||
bool answ = false;
|
||||
if (_valore != null)
|
||||
{
|
||||
double valore = 0;
|
||||
_ = double.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore <= maxVal && valore >= minVal;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se il valore sia > limitValue
|
||||
/// </summary>
|
||||
/// <param name="_valore"></param>
|
||||
/// <param name="maxVal"></param>
|
||||
/// <returns></returns>
|
||||
public bool gtVal(object _valore, double maxVal)
|
||||
{
|
||||
bool answ = false;
|
||||
if (_valore != null)
|
||||
{
|
||||
double valore = 0;
|
||||
_ = double.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore > maxVal;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se il valore sia > 0
|
||||
/// </summary>
|
||||
/// <param name="_valore"></param>
|
||||
/// <returns></returns>
|
||||
public bool gtZero(object _valore)
|
||||
{
|
||||
bool answ = false;
|
||||
decimal valore = 0;
|
||||
decimal.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore > 0;
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user