public MemberDiffViewModel(Member member, Member newMember) { if (member != null) { OldVulkanID = member.VulkanID; OldSurname = member.Surname; OldName = member.Name; OldAddress = member.Address; OldDateOfBirth = member.DateOfBirth; OldGender = member.Gender ? "M" : "Ž"; } if (newMember != null) { NewVulkanID = newMember.VulkanID; NewSurname = newMember.Surname; NewName = newMember.Name; NewAddress = newMember.Address; NewDateOfBirth = newMember.DateOfBirth; NewGender = newMember.Gender ? "M" : "Ž"; } if (member == null && newMember != null) { Action = "Dodajanje"; FinalVulkanId = newMember.VulkanID; FinalSurname = newMember.Surname; FinalName = newMember.Name; FinalAddress = newMember.Address; FinalDateOfBirth = newMember.DateOfBirth; FinalGender = newMember.Gender; } else if (member != null && newMember == null) { Action = "Brisanje"; } else if (member != null && newMember != null) { Action = member.Equals(newMember) ? "Ni sprememb" : "Posodobitev"; } }
public PaymentViewModel(Member member, ICollection<PaymentLogsViewModel> logs) { Member = member; Logs = logs; }