public ActionResult Log(string Id) { parserContent = ParseLogFile.ParseFile(Id, XMLsettingsFilePath); Session["Id"] = Id; Session["parserContent"] = parserContent; Session["filter"] = null; Session["matchWholeWordFilter"] = null; Session["searchContent"] = ""; return(RedirectToAction("DisplayLog", "LogView")); }
public ActionResult LoadFile( string startTime, string endTime, string threadId, string level, string searchContent, string matchWholeWord, int?numberOfItemsPerPage, int?searchNumberOfItems, int?startSearchIndex, int?endSearchIndex, int?startSearchByte, int?endSearchByte, string selectedFile) { if (string.IsNullOrEmpty(selectedFile)) { return(RedirectToAction("DisplayLogFiles", "LogView")); } bool matchWholeWordFilter; if (matchWholeWord == "on") { matchWholeWordFilter = true; Session["matchWholeWordFilter"] = true; } else { matchWholeWordFilter = false; Session["matchWholeWordFilter"] = false; } if (numberOfItemsPerPage == null) { numberOfItemsPerPage = this.numberOfItemsPerPage; } if (searchNumberOfItems == null) { searchNumberOfItems = this.searchNumberOfItems; } LogParserFilter filter = Filter.CreateFilter(startTime, endTime, threadId, level, searchContent, matchWholeWordFilter, searchNumberOfItems, startSearchIndex, endSearchIndex, startSearchByte, endSearchByte, numberOfItemsPerPage); parserContent = ParseLogFile.ParseFile(selectedFile, XMLsettingsFilePath); parserContent.ParseLogFile(filter); Session["Id"] = selectedFile; Session["filter"] = filter; Session["parserContent"] = parserContent; Session["searchContent"] = searchContent; if (numberOfItemsPerPage != null) { this.numberOfItemsPerPage = (int)numberOfItemsPerPage; } return(RedirectToAction("DisplayLog", "LogView")); }