Ejemplo n.º 1
0
 public bool Equals(ExpenseLine other)
 {
     return(this.Mission == other.Mission &&
            this.Type == other.Type &&
            this.Description == other.Description &&
            this.Cost == other.Cost &&
            this.Date == other.Date &&
            this.Justificatory == other.Justificatory &&
            this.IsAdvance == other.IsAdvance);
 }
Ejemplo n.º 2
0
        public void RemoveLine(ExpenseLine el)
        {
            if (this.ExpenseLines.Remove(el))
            {
                this.NbLines--;
                this.TotalCost -= el.Cost;
            }

            if (this.ExpenseLines.Count == 0)
            {
                this.TotalCost = 0.0f;
            }
        }
Ejemplo n.º 3
0
        //Case for advances

        /*public ExpenseReport(Collaborator coll, Month month, int year)
         * {
         *  this.Month = month;
         *  this.Year = year;
         *  this.TotalCost = 0;
         *  this.NbLines = 0;
         *  this.Status = ExpenseReportStatus.UNSENT;
         *  this.ExpenseLines = new List<ExpenseLine>();
         *  this.IsAdvance = true;
         *  this.Collaborator = coll;
         *  ComputeTreatment();
         *
         *  coll.ExpenseReports.Add(this);
         *
         * }*/
        public void AddLine(ExpenseLine el)
        {
            this.ExpenseLines.Add(el);
            this.NbLines++;
            this.TotalCost += el.Cost;
        }