Aggiunto check rilTemp ADM: giallo >37, rosso > 37.5
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using SteamWare;
|
||||
using GPW_data;
|
||||
using System.Globalization;
|
||||
using System.Data;
|
||||
|
||||
namespace GPW_Admin
|
||||
{
|
||||
public class BaseUserControl : System.Web.UI.UserControl
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
/// <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;
|
||||
}
|
||||
/// <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;
|
||||
double valore = 0;
|
||||
double.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore > maxVal;
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se il valore sia < minVal
|
||||
/// </summary>
|
||||
/// <param name="_valore"></param>
|
||||
/// <param name="minVal"></param>
|
||||
/// <returns></returns>
|
||||
public bool ltVal(object _valore, double minVal)
|
||||
{
|
||||
bool answ = false;
|
||||
double valore = 0;
|
||||
double.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore < minVal;
|
||||
return answ;
|
||||
}
|
||||
/// <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;
|
||||
double valore = 0;
|
||||
double.TryParse(_valore.ToString(), out valore);
|
||||
answ = valore <= maxVal && valore >= minVal;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user