private void UpdateElement(object sender, string e) { var newFunction = e; if (!string.IsNullOrEmpty(e) && !UsedFunctions.Contains(newFunction)) { UsedFunctions.Add(newFunction); } }
private void UpdateFunctionList() { UsedFunctions.Clear(); foreach (var ministry in Ministries) { if (!string.IsNullOrEmpty(ministry.Function) && !UsedFunctions.Contains(ministry.Function)) { UsedFunctions.Add(ministry.Function); } } }
private void DeleteFunction(Guid id) { UsedFunctions.Remove(UsedFunctions.Where(uf => uf.Id == id).Single()); }