/// <summary> /// Set standing in the database to the specified value. /// </summary> /// <param name="toID"></param> /// <param name="fromID"></param> /// <param name="standing"></param> public static void SetStanding(long toID, long fromID, decimal standing) { EMMADataSet.StandingsDataTable table = new EMMADataSet.StandingsDataTable(); tableAdapter.FillByIDs(table, toID, fromID); EMMADataSet.StandingsRow dataRow = table.FindBytoIDfromID(toID, fromID); bool newRow = false; if (dataRow == null) { dataRow = table.NewStandingsRow(); dataRow.toID = toID; dataRow.fromID = fromID; newRow = true; } dataRow.standing = standing; if (newRow) { table.AddStandingsRow(dataRow); } tableAdapter.Update(table); }