using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace EQTrack
{
    public partial class FormBHDetail : Form
    {
        public FormBHDetail(string BHNumber, string error, string valid)
        {
            InitializeComponent();
            label2.Text = BHNumber;
            if (valid == "1" && BHNumber != "")
            {
                try
                {
                    DataTable dt = new DataTable();
                    dt = Globals.DeviceService.GetDeviceStatus(BHNumber);
                    dataGridView1.DataSource = dt;
                }
                catch (Exception e)
                {
                    error += "\nFailed to connect to blackhawk server";
                    throw (new Exception("Error" + e.Message));


                }
            }
            richTextBox1.Text = error;
            
        }
    }
}