public async Task <IViewComponentResult> InvokeAsync( int id) { //Gets mill key corresponding to the id MillSearchLogic keysearch = new MillSearchLogic(db); int? key = keysearch.getMillKeyFromId(id); var items = await GetItems(key); return(View(items)); }
public async Task <IViewComponentResult> InvokeAsync( int id) { //Gets mill key corresponding to the id MillSearchLogic keysearch = new MillSearchLogic(db); int? key = keysearch.getMillKeyFromId(id); //If key > 0 (ie, that key exists), gets the //prod data for that mill. Else, returns blank. if (key > 0) { var items = await GetProdData(key); return(View(items)); } else { return(Content("")); } }