public List<RDEMaterial> GetRDEMaterial(int[] idlist, RDEObjectType idType=RDEObjectType.Material) { string type = GetRDEObjectTypeStr(idType); var mapper = new GenericMapperBuilder<RDEMaterial>().Override(new IntToBoolConvertingMapper("Locked")).build(); return StoredProcToList("spMaterialGetRDEFromIDList", mapper, _P("vchrType", type), _P("txtIDList", idlist.Join(","))); }
public List<RDESiteVisit> GetRDESiteVisits(int[] siteVisitIDs, RDEObjectType idType=RDEObjectType.SiteVisit) { string type = GetRDEObjectTypeStr(idType); var mapper = new GenericMapperBuilder<RDESiteVisit>().Override(new IntToBoolConvertingMapper("Locked")).build(); var ids = siteVisitIDs.Join(","); return StoredProcToList("spSiteVisitGetRDEFromIDList", mapper, _P("vchrType", type), _P("txtIDList", ids)); }
private string GetRDEObjectTypeStr(RDEObjectType objType) { switch (objType) { case RDEObjectType.Material: return "m"; case RDEObjectType.Site: return "s"; case RDEObjectType.SiteVisit: return "v"; default: throw new Exception("Unhandled RDEObjectType: " + objType.ToString()); } }