68 lines
1.7 KiB
C#
68 lines
1.7 KiB
C#
namespace MP.SPEC.Data
|
||
{
|
||
public class SelectDossierParams
|
||
{
|
||
#region Public Constructors
|
||
|
||
public SelectDossierParams()
|
||
{ }
|
||
|
||
#endregion Public Constructors
|
||
|
||
#region Public Properties
|
||
|
||
/// <summary>
|
||
/// Inizializzazione con periodo e arrotondamento
|
||
/// </summary>
|
||
/// <param name="minRound"></param>
|
||
/// <param name="numDayPrev"></param>
|
||
/// <returns></returns>
|
||
public static DateTime Init(int minRound)
|
||
{
|
||
TimeSpan DayElapsed = DateTime.Now.Subtract(DateTime.Today);
|
||
int minDay = (int)(DayElapsed.TotalMinutes / minRound) * minRound;
|
||
DateTime endRounded = DateTime.Today.AddMinutes(minDay);
|
||
return endRounded;
|
||
}
|
||
|
||
public string IdxMacchina { get; set; } = "*";
|
||
|
||
public int MaxRecord { get; set; } = 100;
|
||
public DateTime DtRef { get; set; } = Init(3);
|
||
public int CurrPage { get; set; } = 1;
|
||
|
||
#endregion Public Properties
|
||
|
||
#region Public Methods
|
||
|
||
public override bool Equals(object obj)
|
||
{
|
||
if (!(obj is SelectDossierParams item))
|
||
return false;
|
||
|
||
if (IdxMacchina != item.IdxMacchina)
|
||
return false;
|
||
|
||
if (MaxRecord != item.MaxRecord)
|
||
return false;
|
||
|
||
if (DtRef != item.DtRef)
|
||
return false;
|
||
|
||
if (CurrPage != item.CurrPage)
|
||
return false;
|
||
|
||
//if (lastUpdate != item.lastUpdate)
|
||
// return false;
|
||
|
||
return true;
|
||
}
|
||
|
||
public override int GetHashCode()
|
||
{
|
||
return base.GetHashCode();
|
||
}
|
||
|
||
#endregion Public Methods
|
||
}
|
||
} |