Exemplo n.º 1
0
        /// <summary>
        /// Get the Lable Value as string to save it on DB  based on Channel ID
        /// </summary>
        /// <param name="ChannelID"></param>
        /// <returns></returns>
        public static string GetlabelValueByChannelID(string ChannelID)
        {
            XDocument labelDoc;
            string    configPath = string.Concat(AppDomain.CurrentDomain.BaseDirectory, ConfigurationManager.AppSettings["LabelSettingsPath"].ToString());

            labelDoc = XDocument.Load(configPath);
            string labelValue = (from Channels in labelDoc.Descendants("Channel")
                                 where Channels.Attribute("ChannelID").Value == ChannelID
                                 select Channels.Attribute("labelValue").Value).FirstOrDefault();


            return(labelValue);
        }