150 lines
3.9 KiB
C#
150 lines
3.9 KiB
C#
namespace SHERPA.BBM.UI.Data
|
|
{
|
|
public class BBM_SelectData
|
|
{
|
|
#region Public Properties
|
|
|
|
/// <summary>
|
|
/// Basket selezionato
|
|
/// </summary>
|
|
public int BasketId { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Company selezionata
|
|
/// </summary>
|
|
public string Company { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Company selezionata
|
|
/// </summary>
|
|
public int CompanyId { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Cliente selezionato
|
|
/// </summary>
|
|
public string Customer { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Cliente selezionato
|
|
/// </summary>
|
|
public int CustomerId { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Doc selezionato
|
|
/// </summary>
|
|
public int DocId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Negoziazione selezionata
|
|
/// </summary>
|
|
public int NegotiationId { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Valore ricerca libera
|
|
/// </summary>
|
|
public string SearchVal { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Boolean x visualizzazione dei SOLI documenti attivi
|
|
/// </summary>
|
|
public bool ShowAllDoc { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Determina visualizzazione area ricerca
|
|
/// </summary>
|
|
public bool ShowSearch { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Indica se sia attivo Sort ASCending
|
|
/// </summary>
|
|
public bool SortAsc { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Campo x cui si effettua il sorting
|
|
/// </summary>
|
|
public string SortField { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Anno selezionato (0=tutti)
|
|
/// </summary>
|
|
public int YearSel { get; set; } = 0;
|
|
|
|
public BBM_SelectData Clone()
|
|
{
|
|
BBM_SelectData clonedData = new BBM_SelectData()
|
|
{
|
|
YearSel = this.YearSel,
|
|
BasketId = this.BasketId,
|
|
Company = this.Company,
|
|
CompanyId = this.CompanyId,
|
|
Customer = this.Customer,
|
|
CustomerId = this.CustomerId,
|
|
DocId = this.DocId,
|
|
NegotiationId = this.NegotiationId,
|
|
ShowAllDoc = this.ShowAllDoc,
|
|
ShowSearch = this.ShowSearch,
|
|
SearchVal = this.SearchVal,
|
|
SortAsc = this.SortAsc,
|
|
SortField = this.SortField
|
|
};
|
|
return clonedData;
|
|
}
|
|
|
|
public override bool Equals(object? obj)
|
|
{
|
|
if (obj == null)
|
|
return false;
|
|
|
|
if (!(obj is BBM_SelectData item))
|
|
return false;
|
|
|
|
if (YearSel != item.YearSel)
|
|
return false;
|
|
|
|
if (BasketId != item.BasketId)
|
|
return false;
|
|
|
|
if (Company != item.Company)
|
|
return false;
|
|
|
|
if (CompanyId != item.CompanyId)
|
|
return false;
|
|
|
|
if (Customer != item.Customer)
|
|
return false;
|
|
|
|
if (CustomerId != item.CustomerId)
|
|
return false;
|
|
|
|
if (DocId != item.DocId)
|
|
return false;
|
|
|
|
if (NegotiationId != item.NegotiationId)
|
|
return false;
|
|
|
|
if (ShowAllDoc != item.ShowAllDoc)
|
|
return false;
|
|
|
|
if (ShowSearch != item.ShowSearch)
|
|
return false;
|
|
|
|
if (SearchVal != item.SearchVal)
|
|
return false;
|
|
|
|
if (SortAsc != item.SortAsc)
|
|
return false;
|
|
|
|
if (SortField != item.SortField)
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
|
|
#endregion Public Properties
|
|
}
|
|
} |