public static void Update(string oldOznaka, string newOznaka) { int index = stoloviList.FindIndex(s => s.Oznaka == oldOznaka); if (index >= 0) { stoloviList[index].Oznaka = newOznaka; DBStol.UpdateStol(stoloviList[index]); MainWindow.stolChanged(); } }
static StoloviPresenter() { stoloviList.Add(new Stol("-", 1)); stoloviList.AddRange(DBStol.GetStolove()); }
public static void Delete(Stol s) { stoloviList.Remove(s); DBStol.DeleteStol(s); MainWindow.stolChanged(); }
public static void Add(Stol s) { stoloviList.Add(s); DBStol.SaveStol(ref s); MainWindow.stolChanged(); }