public ActionResult Index() { // Screen ID will be displayed on the browser tab. ViewBag.ScreenId = "TCPP021F"; var model = new PreProductSearchViewModel { Grid = GenerateGrid() }; return(View(model)); }
public ActionResult SearchByCode(PreProductSearchViewModel model, GridSettings gridSettings) { if (string.IsNullOrEmpty(gridSettings.SortField)) { gridSettings.SortField = "F03_PreProductCode"; gridSettings.SortOrder = SortOrder.Asc; } var results = _preProductDomain.Search(model.PreProductCode, gridSettings); if (!results.IsSuccess) { return(Json(null, JsonRequestBehavior.AllowGet)); } return(Json(results.Data, JsonRequestBehavior.AllowGet)); }