public PartySubtype Get(int id) { PartySubtype subtype = (from sub in conn.Table <PartySubtype>() where sub.id == id select sub ).First <PartySubtype>(); return(subtype); }
public int Add(string name, string code) { int add = -1; try { PartySubtype subtype = new PartySubtype() { name = name, code = code, deleted = 0 }; conn.Insert(subtype); add = subtype.id; } catch (Exception e) { Debug.WriteLine(e.ToString()); add = -1; } return(add); }