///<summary>Gets all FKeys for the statement and StmtLinkType passed in. Returns an empty list if statementNum is invalid or none found.</summary> public static List <long> GetForStatementAndType(long statementNum, StmtLinkTypes statementType) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { return(Meth.GetObject <List <long> >(MethodBase.GetCurrentMethod(), statementNum, statementType)); } string command = "SELECT FKey FROM stmtlink " + "WHERE StatementNum=" + POut.Long(statementNum) + " " + "AND StmtLinkType=" + POut.Int((int)statementType); return(Db.GetListLong(command)); }
///<summary>Creates stmtlink entries for the statement and FKs passed in.</summary> public static void AttachFKeysToStatement(long stmtNum, List <long> listFKeys, StmtLinkTypes stmtLinkType) { //Remoting role check due to looping. Without this there would be a potential for lots of network traffic. if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), stmtNum, listFKeys, stmtLinkType); return; } listFKeys.ForEach(x => Insert(new StmtLink() { StatementNum = stmtNum, FKey = x, StmtLinkType = stmtLinkType })); }