private void deleteWBS() { _DBcontext.WBSs.Remove(SelectedWBS); _DBcontext.SaveChanges(); WBSs.Remove(SelectedWBS); SelectedWBS = null; }
private void AddWBS() { WBS wbs = CreateNewProjectFromFields(); string tempStatusMessage; if (!WBSisValid(wbs, out tempStatusMessage)) { StatusMessage = tempStatusMessage; return; } _DBcontext.InsertIntoDatabase(wbs); StatusMessage = "WBS successfully added."; // Update wbs observable collection to include new item WBSs.Add(wbs); ResetNewWBSFields(); }
public void InsertIntoDatabase(WBS wbs) { WBSs.Add(wbs); SaveChangesWithValidation(); }
public void DeleteFromDatabase(WBS wbs) { WBSs.Remove(wbs); SaveChangesWithValidation(); }