Exemplo n.º 1
0
 private void BtnDeleteServ_Click(object sender, EventArgs e)
 {
     if (ServerDB.DeleteServer(_server))
     {
         MessageBox.Show("Server has been successfully removed.");
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Populates the server combo box with the first name of every server
        /// </summary>
        private void PopulateServers()
        {
            List <Servers> servers = ServerDB.GetServers();

            cboServer.DataSource    = servers;
            cboServer.DisplayMember = nameof(Servers.FirstName);
        }
Exemplo n.º 3
0
 private void BtnUpdateServ_Click(object sender, EventArgs e)
 {
     _server.FirstName = txtFName.Text;
     _server.LastName  = txtLName.Text;
     if (ServerDB.UpdateServer(_server))
     {
         MessageBox.Show($"{_server.FirstName} {_server.LastName} has been updated");
     }
     ;
 }