Files
GPW/GPW_Commesse/BaseUserControl.cs
T
2020-09-03 09:53:50 +02:00

73 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using GPW_data;
using SteamWare;
using System.Globalization;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW_Commesse
{
public class BaseUserControl : System.Web.UI.UserControl
{
/// <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;
}
/// <summary>
/// idxDipendente in sessione
/// </summary>
protected int idxDip
{
get
{
return memLayer.ML.IntSessionObj("idxDipBCode");
}
set
{
memLayer.ML.setSessionVal("idxDipBCode", value);
}
}
}
}