Esempio n. 1
0
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            Flight_List flist = new Flight_List();

            flist.Show(this);
            try
            {
                var result = dbConnection.ExecuteQuery(new MySqlCommand(comGetFlights));
                if (result.Count == 0)
                {
                    return;
                }
                flist.IDs.Lines    = result[0].ToArray();
                flist.Names.Lines  = result[1].ToArray();
                flist.Starts.Lines = result[2].ToArray();
                flist.Ends.Lines   = result[3].ToArray();
            }
            catch
            {
                MessageBox.Show("Error appeared on loading");
            }
        }
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            Flight_List flist = new Flight_List();

            flist.Show(this);
            try
            {
                var result = dbConnection.ExecuteQuery(new MySqlCommand(comGetFlights));
                if (result.Count == 0)
                {
                    return;
                }
                flist.IDs.Lines          = result.Select(s => s[0]).ToArray();
                flist.Names.Lines        = result.Select(s => s[1]).ToArray();
                flist.Starts.Lines       = result.Select(s => s[2]).ToArray();
                flist.Ends.Lines         = result.Select(s => s[3]).ToArray();
                flist.PacketCounts.Lines = result.Select(s => s[4]).ToArray();
            }
            catch (Exception exc)
            {
                MessageBox.Show("Error appeared on loading " + exc.ToString());
            }
        }