Completato form attività e filtri
This commit is contained in:
@@ -10,88 +10,89 @@ public class ActivityDTO : StbActivity
|
||||
public ActivityCategoryEnum Category { get; set; }
|
||||
public bool Complete { get; set; }
|
||||
|
||||
private sealed class ActivityDtoEqualityComparer : IEqualityComparer<ActivityDTO>
|
||||
{
|
||||
public bool Equals(ActivityDTO? x, ActivityDTO? y)
|
||||
{
|
||||
if (ReferenceEquals(x, y)) return true;
|
||||
if (x is null) return false;
|
||||
if (y is null) return false;
|
||||
if (x.GetType() != y.GetType()) return false;
|
||||
return x.ActivityId == y.ActivityId && x.ActivityResultId == y.ActivityResultId && x.ActivityTypeId == y.ActivityTypeId && x.DataInsAct.Equals(y.DataInsAct) && x.ActivityDescription == y.ActivityDescription && x.ParentActivityId == y.ParentActivityId && x.TipoAnag == y.TipoAnag && x.CodAnag == y.CodAnag && x.CodJcom == y.CodJcom && x.CodJfas == y.CodJfas && Nullable.Equals(x.EstimatedDate, y.EstimatedDate) && Nullable.Equals(x.EstimatedTime, y.EstimatedTime) && Nullable.Equals(x.AlarmDate, y.AlarmDate) && Nullable.Equals(x.AlarmTime, y.AlarmTime) && Nullable.Equals(x.EffectiveDate, y.EffectiveDate) && Nullable.Equals(x.EffectiveTime, y.EffectiveTime) && x.ResultDescription == y.ResultDescription && Nullable.Equals(x.EstimatedEnddate, y.EstimatedEnddate) && Nullable.Equals(x.EstimatedEndtime, y.EstimatedEndtime) && Nullable.Equals(x.EffectiveEnddate, y.EffectiveEnddate) && Nullable.Equals(x.EffectiveEndtime, y.EffectiveEndtime) && x.UserCreator == y.UserCreator && x.UserName == y.UserName && Nullable.Equals(x.PercComp, y.PercComp) && Nullable.Equals(x.EstimatedHours, y.EstimatedHours) && x.CodMart == y.CodMart && x.PartitaMag == y.PartitaMag && x.Matricola == y.Matricola && x.Priorita == y.Priorita && Nullable.Equals(x.ActivityPlayCounter, y.ActivityPlayCounter) && x.ActivityEvent == y.ActivityEvent && x.Guarantee == y.Guarantee && x.Note == y.Note && x.Rfid == y.Rfid && x.IdLotto == y.IdLotto && x.PersonaRif == y.PersonaRif && x.HrNum == y.HrNum && x.Gestione == y.Gestione && Nullable.Equals(x.DataOrd, y.DataOrd) && x.NumOrd == y.NumOrd && x.IdStep == y.IdStep && x.IdRiga == y.IdRiga && Nullable.Equals(x.OraInsAct, y.OraInsAct) && x.IndiceGradimento == y.IndiceGradimento && x.NoteGradimento == y.NoteGradimento && x.FlagRisolto == y.FlagRisolto && x.FlagTipologia == y.FlagTipologia && x.OreRapportino == y.OreRapportino && x.UserModifier == y.UserModifier && Nullable.Equals(x.OraModAct, y.OraModAct) && Nullable.Equals(x.OraViewAct, y.OraViewAct) && x.CodVdes == y.CodVdes && x.CodCmac == y.CodCmac && x.WrikeId == y.WrikeId && x.CodMgrp == y.CodMgrp && x.PlanId == y.PlanId && x.Commessa == y.Commessa && x.Cliente == y.Cliente && x.Category == y.Category && x.Complete == y.Complete;
|
||||
}
|
||||
|
||||
public int GetHashCode(ActivityDTO obj)
|
||||
{
|
||||
var hashCode = new HashCode();
|
||||
hashCode.Add(obj.ActivityId);
|
||||
hashCode.Add(obj.ActivityResultId);
|
||||
hashCode.Add(obj.ActivityTypeId);
|
||||
hashCode.Add(obj.DataInsAct);
|
||||
hashCode.Add(obj.ActivityDescription);
|
||||
hashCode.Add(obj.ParentActivityId);
|
||||
hashCode.Add(obj.TipoAnag);
|
||||
hashCode.Add(obj.CodAnag);
|
||||
hashCode.Add(obj.CodJcom);
|
||||
hashCode.Add(obj.CodJfas);
|
||||
hashCode.Add(obj.EstimatedDate);
|
||||
hashCode.Add(obj.EstimatedTime);
|
||||
hashCode.Add(obj.AlarmDate);
|
||||
hashCode.Add(obj.AlarmTime);
|
||||
hashCode.Add(obj.EffectiveDate);
|
||||
hashCode.Add(obj.EffectiveTime);
|
||||
hashCode.Add(obj.ResultDescription);
|
||||
hashCode.Add(obj.EstimatedEnddate);
|
||||
hashCode.Add(obj.EstimatedEndtime);
|
||||
hashCode.Add(obj.EffectiveEnddate);
|
||||
hashCode.Add(obj.EffectiveEndtime);
|
||||
hashCode.Add(obj.UserCreator);
|
||||
hashCode.Add(obj.UserName);
|
||||
hashCode.Add(obj.PercComp);
|
||||
hashCode.Add(obj.EstimatedHours);
|
||||
hashCode.Add(obj.CodMart);
|
||||
hashCode.Add(obj.PartitaMag);
|
||||
hashCode.Add(obj.Matricola);
|
||||
hashCode.Add(obj.Priorita);
|
||||
hashCode.Add(obj.ActivityPlayCounter);
|
||||
hashCode.Add(obj.ActivityEvent);
|
||||
hashCode.Add(obj.Guarantee);
|
||||
hashCode.Add(obj.Note);
|
||||
hashCode.Add(obj.Rfid);
|
||||
hashCode.Add(obj.IdLotto);
|
||||
hashCode.Add(obj.PersonaRif);
|
||||
hashCode.Add(obj.HrNum);
|
||||
hashCode.Add(obj.Gestione);
|
||||
hashCode.Add(obj.DataOrd);
|
||||
hashCode.Add(obj.NumOrd);
|
||||
hashCode.Add(obj.IdStep);
|
||||
hashCode.Add(obj.IdRiga);
|
||||
hashCode.Add(obj.OraInsAct);
|
||||
hashCode.Add(obj.IndiceGradimento);
|
||||
hashCode.Add(obj.NoteGradimento);
|
||||
hashCode.Add(obj.FlagRisolto);
|
||||
hashCode.Add(obj.FlagTipologia);
|
||||
hashCode.Add(obj.OreRapportino);
|
||||
hashCode.Add(obj.UserModifier);
|
||||
hashCode.Add(obj.OraModAct);
|
||||
hashCode.Add(obj.OraViewAct);
|
||||
hashCode.Add(obj.CodVdes);
|
||||
hashCode.Add(obj.CodCmac);
|
||||
hashCode.Add(obj.WrikeId);
|
||||
hashCode.Add(obj.CodMgrp);
|
||||
hashCode.Add(obj.PlanId);
|
||||
hashCode.Add(obj.Commessa);
|
||||
hashCode.Add(obj.Cliente);
|
||||
hashCode.Add((int)obj.Category);
|
||||
hashCode.Add(obj.Complete);
|
||||
return hashCode.ToHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
public static IEqualityComparer<ActivityDTO> ActivityDtoComparer { get; } = new ActivityDtoEqualityComparer();
|
||||
|
||||
public ActivityDTO Clone()
|
||||
{
|
||||
return (ActivityDTO)MemberwiseClone();
|
||||
}
|
||||
|
||||
private bool Equals(ActivityDTO other)
|
||||
{
|
||||
return Commessa == other.Commessa &&
|
||||
Cliente == other.Cliente &&
|
||||
Category == other.Category &&
|
||||
Complete == other.Complete && ActivityId == other.ActivityId && ActivityResultId == other.ActivityResultId && ActivityTypeId == other.ActivityTypeId && DataInsAct.Equals(other.DataInsAct) && ActivityDescription == other.ActivityDescription && ParentActivityId == other.ParentActivityId && TipoAnag == other.TipoAnag && CodAnag == other.CodAnag && CodJcom == other.CodJcom && CodJfas == other.CodJfas && Nullable.Equals(EstimatedDate, other.EstimatedDate) && Nullable.Equals(EstimatedTime, other.EstimatedTime) && Nullable.Equals(AlarmDate, other.AlarmDate) && Nullable.Equals(AlarmTime, other.AlarmTime) && Nullable.Equals(EffectiveDate, other.EffectiveDate) && Nullable.Equals(EffectiveTime, other.EffectiveTime) && ResultDescription == other.ResultDescription && Nullable.Equals(EstimatedEnddate, other.EstimatedEnddate) && Nullable.Equals(EstimatedEndtime, other.EstimatedEndtime) && Nullable.Equals(EffectiveEnddate, other.EffectiveEnddate) && Nullable.Equals(EffectiveEndtime, other.EffectiveEndtime) && UserCreator == other.UserCreator && UserName == other.UserName && Nullable.Equals(PercComp, other.PercComp) && Nullable.Equals(EstimatedHours, other.EstimatedHours) && CodMart == other.CodMart && PartitaMag == other.PartitaMag && Matricola == other.Matricola && Priorita == other.Priorita && Nullable.Equals(ActivityPlayCounter, other.ActivityPlayCounter) && ActivityEvent == other.ActivityEvent && Guarantee == other.Guarantee && Note == other.Note && Rfid == other.Rfid && IdLotto == other.IdLotto && PersonaRif == other.PersonaRif && HrNum == other.HrNum && Gestione == other.Gestione && Nullable.Equals(DataOrd, other.DataOrd) && NumOrd == other.NumOrd && IdStep == other.IdStep && IdRiga == other.IdRiga && Nullable.Equals(OraInsAct, other.OraInsAct) && IndiceGradimento == other.IndiceGradimento && NoteGradimento == other.NoteGradimento && FlagRisolto == other.FlagRisolto && FlagTipologia == other.FlagTipologia && OreRapportino == other.OreRapportino && UserModifier == other.UserModifier && Nullable.Equals(OraModAct, other.OraModAct) && Nullable.Equals(OraViewAct, other.OraViewAct) && CodVdes == other.CodVdes && CodCmac == other.CodCmac && WrikeId == other.WrikeId && CodMgrp == other.CodMgrp && PlanId == other.PlanId;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is null) return false;
|
||||
if (ReferenceEquals(this, obj)) return true;
|
||||
return obj.GetType() == GetType() && Equals((ActivityDTO)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
var hashCode = new HashCode();
|
||||
hashCode.Add(ActivityId);
|
||||
hashCode.Add(ActivityResultId);
|
||||
hashCode.Add(ActivityTypeId);
|
||||
hashCode.Add(DataInsAct);
|
||||
hashCode.Add(ActivityDescription);
|
||||
hashCode.Add(ParentActivityId);
|
||||
hashCode.Add(TipoAnag);
|
||||
hashCode.Add(CodAnag);
|
||||
hashCode.Add(CodJcom);
|
||||
hashCode.Add(CodJfas);
|
||||
hashCode.Add(EstimatedDate);
|
||||
hashCode.Add(EstimatedTime);
|
||||
hashCode.Add(AlarmDate);
|
||||
hashCode.Add(AlarmTime);
|
||||
hashCode.Add(EffectiveDate);
|
||||
hashCode.Add(EffectiveTime);
|
||||
hashCode.Add(ResultDescription);
|
||||
hashCode.Add(EstimatedEnddate);
|
||||
hashCode.Add(EstimatedEndtime);
|
||||
hashCode.Add(EffectiveEnddate);
|
||||
hashCode.Add(EffectiveEndtime);
|
||||
hashCode.Add(UserCreator);
|
||||
hashCode.Add(UserName);
|
||||
hashCode.Add(PercComp);
|
||||
hashCode.Add(EstimatedHours);
|
||||
hashCode.Add(CodMart);
|
||||
hashCode.Add(PartitaMag);
|
||||
hashCode.Add(Matricola);
|
||||
hashCode.Add(Priorita);
|
||||
hashCode.Add(ActivityPlayCounter);
|
||||
hashCode.Add(ActivityEvent);
|
||||
hashCode.Add(Guarantee);
|
||||
hashCode.Add(Note);
|
||||
hashCode.Add(Rfid);
|
||||
hashCode.Add(IdLotto);
|
||||
hashCode.Add(PersonaRif);
|
||||
hashCode.Add(HrNum);
|
||||
hashCode.Add(Gestione);
|
||||
hashCode.Add(DataOrd);
|
||||
hashCode.Add(NumOrd);
|
||||
hashCode.Add(IdStep);
|
||||
hashCode.Add(IdRiga);
|
||||
hashCode.Add(OraInsAct);
|
||||
hashCode.Add(IndiceGradimento);
|
||||
hashCode.Add(NoteGradimento);
|
||||
hashCode.Add(FlagRisolto);
|
||||
hashCode.Add(FlagTipologia);
|
||||
hashCode.Add(OreRapportino);
|
||||
hashCode.Add(UserModifier);
|
||||
hashCode.Add(OraModAct);
|
||||
hashCode.Add(OraViewAct);
|
||||
hashCode.Add(CodVdes);
|
||||
hashCode.Add(CodCmac);
|
||||
hashCode.Add(WrikeId);
|
||||
hashCode.Add(CodMgrp);
|
||||
hashCode.Add(PlanId);
|
||||
hashCode.Add(Commessa);
|
||||
hashCode.Add(Cliente);
|
||||
hashCode.Add(Category);
|
||||
hashCode.Add(Complete);
|
||||
return hashCode.ToHashCode();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user