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); } }
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; }
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); } }
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); } }
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); } }
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 }; }