示例#1
0
 /// <summary>
 /// Explicitly select a variable and display its metadata
 /// </summary>
 /// <param name="variable"></param>
 public void SelectVariable(PCAxis.Paxiom.Variable variable)
 {
     if (cboVariables.Items.FindByValue(variable.Code) != null)
     {
         cboVariables.SelectedValue = variable.Code;
         DisplayVariable();
     }
     else
     {
         cboVariables.SelectedIndex = 0;
     }
 }
示例#2
0
        private List <MetaItem> GetVariableLinks()
        {
            List <MetaItem> lst = new List <MetaItem>();

            PCAxis.Paxiom.Variable variable = PCAxis.Web.Core.Management.PaxiomManager.PaxiomModel.Meta.Variables.GetByCode(cboVariables.SelectedValue);

            MetaItem itm = new MetaItem();

            itm.Name = variable.Name;

            if (!string.IsNullOrWhiteSpace(variable.MetaId))
            {
                itm.Links = _linkManager.GetVariableLinks(variable.MetaId, LocalizationManager.CurrentCulture.Name).ToList();
            }

            // Only display the variable if it has metadata links
            if (itm.Links.Count > 0)
            {
                lst.Add(itm);
            }

            return(lst);
        }
示例#3
0
 protected override PCAxis.Paxiom.Value FindValue(PCAxis.Paxiom.Variable variable, string findId)
 {
     return(variable.Values.GetByCode(findId));
 }