Esempio n. 1
0
        public void FindVoo(string id)
        {
            try
            {
                conn = connection.DbConnection();

                persist.CreateTable(conn);

                DataTable data = persist.GetById(id, conn);

                StatusFields();
                btn_Incluir.Enabled = false;
                dtVoo.Enabled       = false;

                Array voo = data.Rows[0].ItemArray;

                txt_Custo.Text     = voo.GetValue(2).ToString();
                txt_Distancia.Text = voo.GetValue(3).ToString();
                txt_NvDor.Text     = voo.GetValue(5).ToString();
                dtp_Data.Text      = voo.GetValue(1).ToString();
                if (voo.GetValue(4).ToString() == "N")
                {
                    radioButton1.Checked = true;
                }
                else
                {
                    radioButton2.Checked = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }