public static void ChangeTabSortOrder(ClsCommand rb) { int id = Convert.ToInt32(rb.Value1); Core.DB.TabellenSort t = Core.DBControler.ClsOptionsControler.Tabellensortierung(id); t.absteigend = !t.absteigend; Core.DBControler.ClsOptionsControler.SaveTabellensortierung(t); GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TabellenSort")))); }
public static void LowerTabSortPrio(ClsCommand rb) { int id = Convert.ToInt32(rb.Value1); List <Core.DB.TabellenSort> tl = Core.DBControler.ClsOptionsControler.Tabellensortierung(); Core.DB.TabellenSort t1 = (from x in tl where x.ID == id select x).FirstOrDefault(); int mem = t1.Prio; Core.DB.TabellenSort t2 = (from x in tl where x.Prio == mem + 1 select x).FirstOrDefault(); if (t2 != null) { t1.Prio += 1; t2.Prio -= 1; Core.DBControler.ClsOptionsControler.SaveTabellensortierung(t1); Core.DBControler.ClsOptionsControler.SaveTabellensortierung(t2); } GlobalServerEvents.SendMessage(null, new ClsStringEventArgs(ClsRequests.DataRequest(new ClsCommand(command: "TabellenSort")))); }