Beispiel #1
0
 private void loadPlayers()
 {
     Players.PlayersSoapClient client = new Players.PlayersSoapClient();
     m_Players                      = client.GetAllPlayers_internal();
     tblData.DataSource             = null;
     tblData.DataSource             = m_Players;
     tblData.Columns["Id"].ReadOnly = true;
     m_ControlsTypes                = ControlsTypes.ctPlayers;
 }
Beispiel #2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (m_ControlsTypes == ControlsTypes.ctPlayers)
     {
         Players.PlayersSoapClient client = new Players.PlayersSoapClient();
         client.UpdateAllPlayers_internal((Players.ArrayOfPlayers)m_Players);
         MessageBox.Show("Players saved!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else if (m_ControlsTypes == ControlsTypes.ctMatches)
     {
         Matches.MatchesSoapClient client = new Matches.MatchesSoapClient();
         client.UpdateMatches((Matches.ArrayOfMatches)m_Matches);
         MessageBox.Show("Matches saved!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else if (m_ControlsTypes == ControlsTypes.ctUsers)
     {
         Users.UsersSoapClient client = new Users.UsersSoapClient();
         client.UpdateUsers((Users.ArrayOfUsers)m_Users);
         MessageBox.Show("Users saved!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }