public static List <JobLink> GetForType(JobLinkType linkType, long FKey) { return(GetManyForType(linkType, new List <long>() { FKey })); }
public static void DeleteForType(JobLinkType linkType, long fKey) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), linkType, fKey); return; } string command = "DELETE FROM joblink WHERE LinkType=" + POut.Int((int)linkType) + " " + "AND FKey=" + POut.Long(fKey); Db.NonQ(command); }
public static List <JobLink> GetManyForType(JobLinkType linkType, List <long> listFkeys) { if (listFkeys == null || listFkeys.Count == 0) { return(new List <JobLink>()); } if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { return(Meth.GetObject <List <JobLink> >(MethodBase.GetCurrentMethod(), linkType, listFkeys)); } string command = "SELECT * FROM joblink WHERE LinkType=" + POut.Int((int)linkType) + " " + "AND FKey IN (" + string.Join(",", listFkeys.Select(x => POut.Long(x))) + ")"; return(Crud.JobLinkCrud.SelectMany(command)); }