74 lines
1.8 KiB
C#
74 lines
1.8 KiB
C#
namespace MP.SPEC.Data
|
|
{
|
|
public class SelectDossierParams
|
|
{
|
|
#region Public Constructors
|
|
|
|
public SelectDossierParams()
|
|
{ }
|
|
|
|
#endregion Public Constructors
|
|
|
|
#region Public Properties
|
|
|
|
public int CurrPage { get; set; } = 1;
|
|
|
|
public DateTime DtRef { get; set; } = InitDatetime(5);
|
|
|
|
public string IdxMacchina { get; set; } = "*";
|
|
|
|
public string CodArticolo { get; set; } = "*";
|
|
|
|
public int MaxRecord { get; set; } = 100;
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Public Methods
|
|
|
|
/// <summary>
|
|
/// Inizializzazione con periodo e arrotondamento
|
|
/// </summary>
|
|
/// <param name="minRound"></param>
|
|
/// <returns></returns>
|
|
public static DateTime InitDatetime(int minRound)
|
|
{
|
|
TimeSpan DayElapsed = DateTime.Now.Subtract(DateTime.Today);
|
|
int minDay = (int)Math.Ceiling((double)(DayElapsed.TotalMinutes / minRound)) * minRound;
|
|
DateTime endRounded = DateTime.Today.AddMinutes(minDay);
|
|
return endRounded;
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (!(obj is SelectDossierParams item))
|
|
return false;
|
|
|
|
if (IdxMacchina != item.IdxMacchina)
|
|
return false;
|
|
|
|
if (CodArticolo != item.CodArticolo)
|
|
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
|
|
}
|
|
} |