public void ImportExtensionsPartTwo(IEnumerable <Webextendrecord> webextendrecords) { foreach (var webextendrecord in webextendrecords.OrderBy(a => a.screenname).ThenBy(a => a.revision)) { var criteria = new Webextendcriteria { cono = webextendrecord.cono, screenname = webextendrecord.screenname, latestrevisiononly = true, level = "b", statustype = "b" }; var list = this._assharedinquiryRepository.GetWebExtensionList(criteria).webextendrecord.Where(x => x.cono == webextendrecord.cono).ToList(); if (list?.Count > 0) { var firstRecord = list.First(); var newExtendRecord = this._assharedinquiryRepository.WebExtensionCreateRevision(new Webextendcriteria { webextensionrowid = firstRecord.webextendRowID }); newExtendRecord.activefl = webextendrecord.activefl; newExtendRecord.functionname = firstRecord.functionname; newExtendRecord.screenname = firstRecord.screenname; newExtendRecord.settingvalue = webextendrecord.settingvalue; newExtendRecord.tag = webextendrecord.tag; newExtendRecord.descrip = webextendrecord.descrip; this._assharedinquiryRepository.WebExtensionUpdate(newExtendRecord); continue; } webextendrecord.rowpointer = string.Empty; this._assharedinquiryRepository.WebExtensionCreate(webextendrecord); } }
public Webextendrecord WebExtensionCreateRevision(Webextendcriteria webextendcriteria) { return(this.adapter.WebExtensionCreateRevision(webextendcriteria)); }
public IEnumerable <Webextendrecord> GetActiveJavaScriptWebExtension(Webextendcriteria webextendcriteria) { return(this.adapter.GetActiveJavaScriptWebExtension(webextendcriteria)); }
public Webextendrecord WebExtensionRetrieve(Webextendcriteria webextendcriteria) { return(this.adapter.WebExtensionRetrieve(webextendcriteria)); }
public AssharedinquiryGetWebExtensionListResponseAPI GetWebExtensionList(Webextendcriteria webextendcriteria) { return(this.adapter.GetWebExtensionList(webextendcriteria)); }
public Webextendrecord GetActiveWebExtension(Webextendcriteria webextendcriteria) { return(this.adapter.GetActiveWebExtension(webextendcriteria)); }
public JsonViewResponseApi GetView(string path = "", string profile = "", string user = "", bool disableExtensions = false, bool disablePersonalization = false) { var jsonViewResponseApi = new JsonViewResponseApi(); var isExtensionView = IsExtensionView(path); string viewId; // Get default view file if (!isExtensionView) { var viewAbsPath = GetViewFilePath(path); var defaultView = File.ReadAllText(viewAbsPath, Encoding.UTF8); jsonViewResponseApi.view = defaultView; // Get viewId from json content in the file viewId = GetViewId(defaultView); } else { // For extension views the path is the viewId viewId = path; } if (viewId != string.Empty) { if (!disableExtensions) { // Build criteria to find the active extension record to use // Note: The call first tries to find a record for the current cono, otherwise for the system (cono of 0). var criteria = new Webextendcriteria { screenname = viewId }; // Get extension record var webExtendRecord = this._inquiryRepository.GetActiveWebExtension(criteria); // Set the response with the found record or with null (the backend can't return null so it instead returns an object with null values) jsonViewResponseApi.webextendrecord = (webExtendRecord?.webextendRowID != null) ? webExtendRecord : null; } if (!disablePersonalization) { // Build criteria to find the active personalization record to use // Note: The call uses this criteria in a very specific way, following our personalization priorty order. // 1st, it tries to find a record by screenname, cono, and operator. // 2nd (if 1st fails), it tries to find a record by screenname, cono, and profile. // 3rd (if 2nd fails), it tries to find a record by screenname and cono. var criteria = new Webmodlistcriteria { screenname = viewId, profile = profile, @operator = user }; // Get personalization record var webModRecord = this._entryRepository.GetActiveWebModification(criteria); // Set the response with the found record or with null (the backend can't return null so it instead returns an object with null values) jsonViewResponseApi.webmodrecord = (webModRecord?.webmodRowID != null) ? webModRecord : null; } } return(jsonViewResponseApi); }
public Webextendrecord WebExtensionCreateRevision(Webextendcriteria webextendcriteria) { return(this.repository.WebExtensionCreateRevision(webextendcriteria)); }
public Webextendrecord WebExtensionRetrieve(Webextendcriteria webextendcriteria) { return(this.repository.WebExtensionRetrieve(webextendcriteria)); }
public Webextendrecord GetActiveWebExtension(Webextendcriteria webextendcriteria) { return(this.repository.GetActiveWebExtension(webextendcriteria)); }