public string AddPersonSources(string record, string sources) { var iModel = new SourceSearch(new Security(new WebUser())); string retVal = ""; try { iModel.AddSources(record.ParseToGuidList(), sources.ParseToGuidList(),SourceTypes.Person); } catch (Exception ex1) { retVal = ex1.Message; } return WebHelper.MakeReturn(record, retVal); }
public IHttpActionResult AddPersonSources(SourceRecordSourceMap sourceRecordSourceMap) { var sourceSearch = new SourceSearch(new Security(new WebUser())); string retVal = ""; try { sourceSearch.AddSources(sourceRecordSourceMap.Records.ParseToGuidList(), sourceRecordSourceMap.Sources.ParseToGuidList(), SourceTypes.Person); } catch (Exception ex1) { retVal = ex1.Message; } if (retVal != "") { return Content(HttpStatusCode.BadRequest, retVal); } return Ok(retVal); }