예제 #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);
     }
 }
예제 #2
0
 internal static MarkerModel FromDataRow(Game game, IVistaDBRow row)
 {
     var result = new MarkerModel
     {
         id = (Guid)row["id"].Value,
         name = (string)row["name"].Value,
         iconUri = (string)row["icon"].Value,
         set = game.GetSet((Guid)row["setId"].Value)
     };
     return result;
 }
예제 #3
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);
            }
        }
예제 #4
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);
            }
        }
예제 #5
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);
            }
        }
예제 #6
0
파일: Set.cs 프로젝트: YoshiEnVerde/OCTGN
 internal static Set FromDataRow(Game game, IVistaDBRow row)
 {
     return new Set
     {
         Id = (Guid)row["id"].Value,
         Name = (string)row["name"].Value,
         Game = game,
         GameVersion = new Version((string)row["gameVersion"].Value),
     Version = new Version((string)row["version"].Value),
         PackageName = (string)row["package"].Value
     };
 }