private void SaveAgriculturalYear(object agriculturalYearInstance) { AgriculturalYearViewModel agriculturalYear = agriculturalYearInstance as AgriculturalYearViewModel; if (agriculturalYear != null && agriculturalYear.IsValid) { AgriculturalYears.Add(agriculturalYear); } Back(); }
private void DeleteAgriculturalYear(object agriculturalYearObject) { AgriculturalYearViewModel agriculturalYear = agriculturalYearObject as AgriculturalYearViewModel; if (agriculturalYear != null) { AgriculturalYears.Remove(agriculturalYear); } Back(); }