public void Add() { Paystub temp = new Paystub() { Index = (uint)PaystubDataList.Count + 1 }; if (NameInput != null) { temp.Name = NameInput; } if (GrossInput != null) { temp.Gross = (decimal)GrossInput; } if (NetInput != null) { temp.Net = (decimal)NetInput; } PaystubDataList.Add(temp); ClearInputFields(); }
public void AddPaystub() { PaystubDataList.Add(Paystub.Default((uint)PaystubDataList.Count)); }