public static void DeleteFromCurrentTable(List <string> vals) { if (vals.Count == 0) { return; } //Broker.table = currentTable; DeleteWindow dw = new DeleteWindow(); dw.StartPosition = FormStartPosition.CenterParent; dw.ShowDialog(); try { if (Broker.f) { CurrentTable.Prepare(); CurrentTable.Delete(vals); Broker.f = false; } } catch (Exception exp) { MessageBox.Show(exp.Message); } }
public static void InsertIntoCurrentTable() { InsertWindows[CurrentInd].StartPosition = FormStartPosition.CenterParent; Broker.table = CurrentTable; CurrentTable.Prepare(); InsertWindows[CurrentInd].ShowDialog(); //if (Broker.f) { currentTable.Add(Broker.vals); Broker.f = false; } }
public static void UpdateCurrentTable(List <string> oldValues) { if (oldValues.Count == 0) { return; } Broker.vals = oldValues; Broker.table = CurrentTable; CurrentTable.Prepare(); UpdateWindows[CurrentInd].StartPosition = FormStartPosition.CenterParent; UpdateWindows[CurrentInd].ShowDialog(); }