Beispiel #1
0
 public bool HasTheSameClauses(Proposal other)
 {
     if (this.Clauses == null)
     {
         this.Clauses = new List <ProposalClause>();
     }
     if (other.Clauses == null)
     {
         other.Clauses = new List <ProposalClause>();
     }
     return(this.Clauses.All(i => other.Clauses.Any(oi => oi.ClauseName == i.ClauseName && oi.ClauseText == i.ClauseText && oi.ClauseOrder == i.ClauseOrder)) &&
            other.Clauses.All(oi => this.Clauses.Any(i => oi.ClauseName == i.ClauseName && oi.ClauseText == i.ClauseText && oi.ClauseOrder == i.ClauseOrder)));
 }
Beispiel #2
0
 public bool HasTheSameFixedCosts(Proposal other)
 {
     if (this.FixedCosts == null)
     {
         this.FixedCosts = new List <ProposalFixedCost>();
     }
     if (other.FixedCosts == null)
     {
         other.FixedCosts = new List <ProposalFixedCost>();
     }
     return(this.FixedCosts.All(i => other.FixedCosts.Any(oi => oi.ProposalFixedCostUId == i.ProposalFixedCostUId && oi.Cost == i.Cost && oi.CostDescription == oi.CostDescription && oi.RepassToClient == i.RepassToClient)) &&
            other.FixedCosts.All(oi => this.FixedCosts.Any(i => oi.ProposalFixedCostUId == i.ProposalFixedCostUId && oi.Cost == i.Cost && oi.CostDescription == oi.CostDescription && oi.RepassToClient == i.RepassToClient)));
 }
Beispiel #3
0
 public bool HasTheSameItems(Proposal other)
 {
     if (this.Items == null)
     {
         this.Items = new List <ProposalItem>();
     }
     if (other.Items == null)
     {
         other.Items = new List <ProposalItem>();
     }
     return(this.Items.All(i => other.Items.Any(oi => oi.BacklogItemUId == i.BacklogItemUId)) &&
            other.Items.All(oi => this.Items.Any(i => oi.BacklogItemUId == i.BacklogItemUId)));
 }
Beispiel #4
0
 public bool IsTheSame(Proposal other)
 {
     return
         (this.ProjectUId == other.ProjectUId &&
          this.ProposalUId == other.ProposalUId &&
          this.ProposalName == other.ProposalName &&
          this.ProposalStatus == other.ProposalStatus &&
          this.TotalValue == other.TotalValue &&
          this.TemplateName == other.TemplateName &&
          this.UseCalcPrice == other.UseCalcPrice &&
          this.Description == other.Description &&
          this.Discount == other.Discount &&
          this.CreateDate == other.CreateDate &&
          this.ApprovalDate == other.ApprovalDate &&
          this.EstimatedEndDate == other.EstimatedEndDate &&
          this.EstimatedStartDate == other.EstimatedStartDate &&
          this.CurrencySymbol == other.CurrencySymbol &&
          this.CurrencyRate == other.CurrencyRate &&
          this.HasTheSameFixedCosts(other) &&
          this.HasTheSameItems(other) &&
          this.HasTheSameClauses(other));
 }
Beispiel #5
0
 public bool IsTheSame(Proposal other)
 {
     return
         this.ProjectUId == other.ProjectUId
         && this.ProposalUId == other.ProposalUId
         && this.ProposalName == other.ProposalName
         && this.ProposalStatus == other.ProposalStatus
         && this.TotalValue == other.TotalValue
         && this.TemplateName == other.TemplateName
         && this.UseCalcPrice == other.UseCalcPrice
         && this.Description == other.Description
         && this.Discount == other.Discount
         && this.CreateDate == other.CreateDate
         && this.ApprovalDate == other.ApprovalDate
         && this.EstimatedEndDate == other.EstimatedEndDate
         && this.EstimatedStartDate == other.EstimatedStartDate
         && this.CurrencySymbol == other.CurrencySymbol
         && this.CurrencyRate == other.CurrencyRate
         && this.HasTheSameFixedCosts(other)
         && this.HasTheSameItems(other)
         && this.HasTheSameClauses(other);
 }
Beispiel #6
0
 public bool HasTheSameItems(Proposal other)
 {
     if (this.Items == null)
         this.Items = new List<ProposalItem>();
     if (other.Items == null)
         other.Items = new List<ProposalItem>();
     return this.Items.All(i => other.Items.Any(oi => oi.BacklogItemUId == i.BacklogItemUId))
         && other.Items.All(oi => this.Items.Any(i => oi.BacklogItemUId == i.BacklogItemUId));
 }
Beispiel #7
0
 public bool HasTheSameFixedCosts(Proposal other)
 {
     if (this.FixedCosts == null)
         this.FixedCosts = new List<ProposalFixedCost>();
     if (other.FixedCosts == null)
         other.FixedCosts = new List<ProposalFixedCost>();
     return this.FixedCosts.All(i => other.FixedCosts.Any(oi => oi.ProposalFixedCostUId == i.ProposalFixedCostUId && oi.Cost == i.Cost && oi.CostDescription == oi.CostDescription && oi.RepassToClient == i.RepassToClient))
         && other.FixedCosts.All(oi => this.FixedCosts.Any(i => oi.ProposalFixedCostUId == i.ProposalFixedCostUId && oi.Cost == i.Cost && oi.CostDescription == oi.CostDescription && oi.RepassToClient == i.RepassToClient));
 }
Beispiel #8
0
 public bool HasTheSameClauses(Proposal other)
 {
     if (this.Clauses == null)
         this.Clauses = new List<ProposalClause>();
     if (other.Clauses == null)
         other.Clauses = new List<ProposalClause>();
     return this.Clauses.All(i => other.Clauses.Any(oi => oi.ClauseName == i.ClauseName && oi.ClauseText==i.ClauseText && oi.ClauseOrder==i.ClauseOrder))
         && other.Clauses.All(oi => this.Clauses.Any(i => oi.ClauseName == i.ClauseName && oi.ClauseText == i.ClauseText && oi.ClauseOrder == i.ClauseOrder));
 }