public FreqInfoControl(List <StationEmitInfo> listEmitInfo)
        {
            InitializeComponent();
            foreach (StationEmitInfo dr in listEmitInfo)
            {
                try
                {
                    FreqInfo freqInfo = new FreqInfo();

                    freqInfo.FREQ_TYPE = dr.FreqType.ToString();

                    if (dr.FreqEC != null)
                    {
                        if (dr.FreqEC >= 3)
                        {
                            freqInfo.FREQ_UC = dr.FreqEC + " M";
                        }
                        else
                        {
                            freqInfo.FREQ_UC = dr.FreqEC * 1000 + " kHz";
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_UC = "";
                    }

                    if (dr.FreqEFB != null)
                    {
                        if (dr.FreqEFB >= 3)
                        {
                            freqInfo.FREQ_EFB = dr.FreqEFB + " M";
                        }
                        else
                        {
                            freqInfo.FREQ_EFB = dr.FreqEFB * 1000 + " kHz";
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_EFB = "";
                    }

                    if (dr.FreqEFE != null)
                    {
                        if (dr.FreqEFE >= 3)
                        {
                            freqInfo.FREQ_EFE = dr.FreqEFE + " M";
                        }
                        else
                        {
                            freqInfo.FREQ_EFE = dr.FreqEFE * 1000 + " kHz";
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_EFE = "";
                    }

                    if (dr.FreqRFB != null)
                    {
                        if (dr.FreqRFB >= 3)
                        {
                            freqInfo.FREQ_RFB = dr.FreqRFB + " M";
                        }
                        else
                        {
                            freqInfo.FREQ_RFB = dr.FreqRFB * 1000 + " kHz";
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_RFB = "";
                    }

                    if (dr.FreqRFE != null)
                    {
                        if (dr.FreqRFE >= 3)
                        {
                            freqInfo.FREQ_RFE = dr.FreqRFE + " M";
                        }
                        else
                        {
                            freqInfo.FREQ_RFE = dr.FreqRFE * 1000 + " kHz";
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_RFE = "";
                    }


                    if (dr.FreqBand != null)
                    {
                        if (dr.FreqBand >= 3)
                        {
                            freqInfo.FREQ_E_BAND = dr.FreqBand + " M";
                        }
                        else
                        {
                            freqInfo.FREQ_E_BAND = dr.FreqBand * 1000 + " kHz";
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_E_BAND = "";
                    }
                    freqInfo.FREQ_R_BAND = "";
                    freqInfo.FREQ_MOD    = dr.FreqMod.ToString();
                    freqList.Add(freqInfo);
                    //break;
                }
                catch
                {
                }
            }
            Dg_FreqInfoList.ItemsSource = freqList;
        }
        public FreqInfoControl(DataTable dataTable)
        {
            InitializeComponent();

            foreach (DataRow dr in dataTable.Rows)
            {
                try
                {
                    FreqInfo freqInfo = new FreqInfo();

                    //freqInfo.FREQ_EFB = dr["FREQ_EFB"];
                    //freqInfo.FREQ_EFE = dr["FREQ_EFE"];
                    //freqInfo.FREQ_RFB = dr["FREQ_RFB"];
                    //freqInfo.FREQ_RFE = dr["FREQ_RFE"];
                    //freqInfo.FREQ_UC = dr["FREQ_UC"];
                    if (dataTable.Columns.Contains("FREQ_TYPE"))
                    {
                        freqInfo.FREQ_TYPE = dr["FREQ_TYPE"].ToString();
                    }
                    else
                    {
                        freqInfo.FREQ_TYPE = "";
                    }
                    double dbUC = 0;
                    if (dataTable.Columns.Contains("FREQ_UC"))
                    {
                        if (dr["FREQ_UC"].ToString() != null && dr["FREQ_UC"].ToString() != string.Empty && double.TryParse(dr["FREQ_UC"].ToString(), out dbUC) == true)
                        {
                            if (dbUC >= 3)
                            {
                                freqInfo.FREQ_UC = dbUC + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_UC = dbUC * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_UC = dr["FREQ_UC"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_UC = "";
                    }

                    double dbEFB = 0;
                    if (dataTable.Columns.Contains("FREQ_EFB"))
                    {
                        if (dr["FREQ_EFB"].ToString() != null && dr["FREQ_EFB"].ToString() != string.Empty && double.TryParse(dr["FREQ_EFB"].ToString(), out dbEFB) == true)
                        {
                            if (dbEFB >= 3)
                            {
                                freqInfo.FREQ_EFB = dbEFB + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_EFB = dbEFB * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_EFB = dr["FREQ_EFB"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_EFB = "";
                    }



                    double dbEFE = 0;
                    if (dataTable.Columns.Contains("FREQ_EFE"))
                    {
                        if (dr["FREQ_EFE"].ToString() != null && dr["FREQ_EFE"].ToString() != string.Empty && double.TryParse(dr["FREQ_EFE"].ToString(), out dbEFE) == true)
                        {
                            if (dbEFE >= 3)
                            {
                                freqInfo.FREQ_EFE = dbEFE + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_EFE = dbEFE * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_EFE = dr["FREQ_EFE"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_EFE = "";
                    }

                    double dbRFB = 0;
                    if (dataTable.Columns.Contains("FREQ_RFB"))
                    {
                        if (dr["FREQ_RFB"].ToString() != null && dr["FREQ_RFB"].ToString() != string.Empty && double.TryParse(dr["FREQ_RFB"].ToString(), out dbRFB) == true)
                        {
                            if (dbRFB >= 3)
                            {
                                freqInfo.FREQ_RFB = dbRFB + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_RFB = dbRFB * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_RFB = dr["FREQ_RFB"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_RFB = "";
                    }

                    double dbRFE = 0;
                    if (dataTable.Columns.Contains("FREQ_RFE"))
                    {
                        if (dr["FREQ_RFE"].ToString() != null && dr["FREQ_RFE"].ToString() != string.Empty && double.TryParse(dr["FREQ_RFE"].ToString(), out dbRFE) == true)
                        {
                            if (dbRFE >= 3)
                            {
                                freqInfo.FREQ_RFE = dbRFE + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_RFE = dbRFE * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_RFE = dr["FREQ_RFE"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_RFE = "";
                    }
                    //freqInfo.FREQ_E_BAND = dr["FREQ_E_BAND"];
                    //freqInfo.FREQ_R_BAND = dr["FREQ_R_BAND"];

                    double db_E_BAND = 0;
                    if (dataTable.Columns.Contains("FREQ_E_BAND"))
                    {
                        if (dr["FREQ_E_BAND"].ToString() != null && dr["FREQ_E_BAND"].ToString() != string.Empty && double.TryParse(dr["FREQ_E_BAND"].ToString(), out db_E_BAND) == true)
                        {
                            if (db_E_BAND >= 3)
                            {
                                freqInfo.FREQ_E_BAND = db_E_BAND + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_E_BAND = db_E_BAND * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_E_BAND = dr["FREQ_E_BAND"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_E_BAND = "";
                    }


                    double db_R_BAND = 0;
                    if (dataTable.Columns.Contains("FREQ_R_BAND"))
                    {
                        if (dr["FREQ_R_BAND"].ToString() != null && dr["FREQ_R_BAND"].ToString() != string.Empty && double.TryParse(dr["FREQ_R_BAND"].ToString(), out db_R_BAND) == true)
                        {
                            if (db_R_BAND >= 3)
                            {
                                freqInfo.FREQ_R_BAND = db_R_BAND + " M";
                            }
                            else
                            {
                                freqInfo.FREQ_R_BAND = db_R_BAND * 1000 + " kHz";
                            }
                        }
                        else
                        {
                            freqInfo.FREQ_R_BAND = dr["FREQ_R_BAND"].ToString();
                        }
                    }
                    else
                    {
                        freqInfo.FREQ_R_BAND = "";
                    }
                    //freqInfo.FT_FREQ_TimeB = dr["FT_FREQ_TimeB"];
                    //freqInfo.FT_FREQ_TimeE = dr["FT_FREQ_TimeE"];

                    //freqInfo.FT_FREQ_INFO_Type = dr["FT_FREQ_INFO_Type"];
                    if (dataTable.Columns.Contains("FREQ_MOD"))
                    {
                        freqInfo.FREQ_MOD = dr["FREQ_MOD"].ToString();
                    }
                    else
                    {
                        freqInfo.FREQ_MOD = "";
                    }
                    //freqInfo.FT_FREQ_HCL = dr["FT_FREQ_HCL"];
                    freqList.Add(freqInfo);
                    //break;
                }
                catch
                {
                }
            }
            Dg_FreqInfoList.ItemsSource = freqList;
        }