// GET: Return public ActionResult Index() { isAdminLogged(); var model = new ShowReturnCardsViewModel { ReturnCards = new List <ReturnBase>() }; return(View("List", model)); }
public ActionResult Search(string KeyWord, int TradeForm) { _logger.Info("Start Search(GET) - OrderController"); isAdminLogged(); var searchResult = _returnService.GetReturnCards(KeyWord, TradeForm); var model = new ShowReturnCardsViewModel(); if (searchResult != null) { model = new ShowReturnCardsViewModel { ReturnCards = searchResult }; _logger.Info("Success: Complete Search(GET) - ReturnController"); } else { _logger.Error("Error: Search(GET) - ReturnController | Can not find any return card with given key word and trade form!"); } return(View("List", model)); }