internal void SetDataFrom(BillInfo inComingBillInfo) { Amount = inComingBillInfo.Amount; BillName = inComingBillInfo.BillName; Description = inComingBillInfo.Description; DueDate = inComingBillInfo.DueDate; IsAlreadyPaid = inComingBillInfo.IsAlreadyPaid; Type = inComingBillInfo.Type; Attachement = inComingBillInfo.Attachement; }
public bool SameData(BillInfo other) { if (this == null && other == null) { return(true); } if (this == null && other != null) { return(false); } if (this != null && other == null) { return(false); } // both are not null if (Attachement.Length != other.Attachement.Length) { return(false); } for (int i = 0; i < Attachement.Length; i++) { if (Attachement[i] != other.Attachement[i]) { return(false); } } return(Type == other.Type && Description == other.Description && BillName == other.BillName && Amount == other.Amount && DueDate == other.DueDate && IsAlreadyPaid == other.IsAlreadyPaid); }