Exemplo n.º 1
0
        public override bool Equals(object other)
        {
            if (other is null || !(other is PaySlip))
            {
                return(false);
            }

            PaySlip p = (PaySlip)other;

            if (this.StartDate != p.StartDate)
            {
                return(false);
            }

            if (this.EndDate != p.EndDate)
            {
                return(false);
            }

            if (this.GrossIncome != p.GrossIncome)
            {
                return(false);
            }

            if (this.IncomeTax != p.IncomeTax)
            {
                return(false);
            }

            if (this.NetIncome != p.NetIncome)
            {
                return(false);
            }

            if (this.Super != p.Super)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public string ToCsvString()
        {
            PaySlip p = this.Payslips.LastOrDefault();

            return(string.Format("{0} {1},{2} - {3},{4},{5},{6},{7}", this.FirstName, this.LastName, p.StartDate.ToString("dd MMMM"), p.EndDate.ToString("dd MMMM"), p.GrossIncome, p.IncomeTax, p.NetIncome, p.Super));
        }