private void DeleteRow(int rowId) { if (Master.AccessType == "R") return; var oPlayers = new PlayerRepository(new CSBCDbContext()); try { oPlayers.DeleteById(rowId); } catch (Exception ex) { lblError.Text = ex.Message; } PlayerId = 0; }