public ActionResult Index(Nullable <int> id) { if (id.HasValue) { List <InputDTO> inputMessages = new List <InputDTO>(); InformationTypeDTO informationType = InformationTypeDAC.GetInformationType(id.Value, ContextManager.Current.SelectedAreaID.Value); if (informationType.Title == "Unknown") // id.Value == 203) { inputMessages = InputDAC.GetFilteredInputMessages(id.Value, ContextManager.Current.SelectedAreaID.Value, Membership.GetUser().Email); } else { inputMessages = InputDAC.GetInputMessages(id.Value, ContextManager.Current.SelectedAreaID.Value, 0); } return(View("Index", new InputIndexModel() { InputMessages = inputMessages, InformationType = InformationTypeDAC.GetInformationType(id.Value, ContextManager.Current.SelectedAreaID.Value) })); } else { return(View("Index", new InputIndexModel() { InputMessages = InputDAC.GetInputMessages(ContextManager.Current.SelectedAreaID.Value, 50) })); } }
public ActionResult ReanalyzeAllItems(Nullable <int> informationTypeID) { List <InputDTO> inputMessages = null; if (informationTypeID.HasValue) { InformationTypeDTO informationType = InformationTypeDAC.GetInformationType(informationTypeID.Value, ContextManager.Current.SelectedAreaID.Value); if (informationType.Title == "Unknown") { inputMessages = InputDAC.GetFilteredInputMessages(informationTypeID.Value, ContextManager.Current.SelectedAreaID.Value, Membership.GetUser().Email); } else { inputMessages = InputDAC.GetInputMessages(informationTypeID.Value, ContextManager.Current.SelectedAreaID.Value, 0); } } else { inputMessages = InputDAC.GetInputMessages(ContextManager.Current.SelectedAreaID.Value, 100000); } if (inputMessages != null) { foreach (InputDTO inputMessage in inputMessages) { Analyzer.RerunAnalysis(inputMessage.ID.Value, ContextManager.Current.SelectedAreaID.Value); } } return(Index(informationTypeID)); }