/// <summary>
        /// 
        /// </summary>
        /// <param name="drDoc"></param>
        /// <param name="oMetadata"></param>
        public Metadata(DataRow drDoc,Metadata oMetadata)
        {
            try
            {


                SiteId = oMetadata.SiteId;
                SiteTitle = oMetadata.SiteTitle;
                NewTitle = oMetadata.NewTitle;
                SiteDescription = oMetadata.SiteDescription;
                SiteUrl = oMetadata.SiteUrl;
                Position = oMetadata.Position;
                GroupId = oMetadata.GroupId;
                GlobalNav = oMetadata.GlobalNav;

                Footer = drDoc["FileName"].ToString();

                ParentId = drDoc["File"].ToString();

            
            }
            catch (Exception ex)
            {
                 throw;
            }
        }
        public bool EqualTo(Metadata oMetadata)
        {
            PropertyInfo[] properties = this.GetType().GetProperties();

            foreach (PropertyInfo property in properties)
            {
                if (this.GetType().GetProperty(property.Name).GetValue(this, null) != oMetadata.GetType().GetProperty(property.Name).GetValue(oMetadata, null))
                {
                    return false;
                
                }
            
            }
            return true;
        
        }
        public Metadata(DataRow drReference, Metadata oMetadata, bool bReference)
        {
            try
            {

                SiteId = Convert.ToDouble(drReference["SiteId"]);
                SiteTitle = string.IsNullOrEmpty(drReference["SiteTitle"].ToString()) ? "1" : drReference["SiteTitle"].ToString();
                NewTitle = oMetadata.NewTitle;
                SiteDescription = oMetadata.SiteDescription;
                SiteUrl = oMetadata.SiteUrl;
                Position = oMetadata.Position;
                GroupId = oMetadata.GroupId;
                GlobalNav = drReference["GlobalNav"].ToString();
                Footer = string.IsNullOrEmpty(drReference["Footer"].ToString()) ? "0" : drReference["Footer"].ToString();
                ParentId = drReference["ParentId"].ToString();
         
            }
            catch (Exception ex)
            {
                 throw;
            }
        }