Exemplo n.º 1
0
 public long GetQualifier(long qualified)
 {
     if (qualified < 0)
     {
         this.tbRootRelations.ActiveIndex = "findById";
         IVistaDBRow template = this.tbRootRelations.CurrentKey;
         template.InitTop();
         template["id"].Value = qualified;
         if (this.tbRootRelations.Find(template, "findById", false, false))
         {
             return((long)this.tbRootRelations.Get("qualifierId").Value);
         }
         else
         {
             return(0);
         }
     }
     else
     if (PositionOnInnerRelation(qualified))
     {
         return((long)this.tbInnerRelations.Get("qualifierId").Value);
     }
     else
     {
         return(0);
     }
 }
Exemplo n.º 2
0
        private bool PositionOnInnerRelation(long relation)
        {
            this.tbInnerRelations.ActiveIndex = "findById";
            IVistaDBRow template = this.tbInnerRelations.CurrentKey;

            template.InitTop();
            template["id"].Value = relation;
            if (this.tbInnerRelations.Find(template, "findById", false, false))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public long Lookup(string text)
        {
            this.tbRootRelations.ActiveIndex = "findByTerminalValue";
            IVistaDBRow template = this.tbRootRelations.CurrentKey;

            template.InitTop();
            template["terminalValue"].Value = text;
            if (this.tbRootRelations.Find(template, "findByTerminalValue", false, false))
            {
                return((long)this.tbRootRelations.Get("id").Value);
            }
            else
            {
                return(0);
            }
        }
Exemplo n.º 4
0
        public long Lookup(long nParent, long aParent)
        {
            this.tbInnerRelations.ActiveIndex = "findByParents";
            IVistaDBRow template = this.tbInnerRelations.CurrentKey;

            template.InitTop();
            template["nParentId"].Value = nParent;
            template["aParentId"].Value = aParent;
            if (this.tbInnerRelations.Find(template, "findByParents", false, false))
            {
                return((long)this.tbInnerRelations.Get("id").Value);
            }
            else
            {
                return(0);
            }
        }