public async Task <IActionResult> Load(AutomaticTradeFractionViewModel viewModel) { var stateIdList = States.GetStateIdList(viewModel.StateFilter); var response = await Mediator.Send(new GetExcelFileListRequest { StateIds = stateIdList, StateDate = viewModel.StateDate }); if (response.IsFailed()) { return(Json(response)); } return(Json(response.Data)); }
public IActionResult Index() { var viewModel = new AutomaticTradeFractionViewModel(); viewModel.GridModel = new GridCrudModel { ControllerName = "AutomaticTradeFraction", Key = "ExcelFileId", LoadAction = nameof(Load), InsertAction = nameof(Create), UpdateAction = nameof(CreateOrUpdate), DeleteAction = nameof(Delete), VerifyAction = nameof(Verify), RejectAction = nameof(Reject), DisplayAction = nameof(Load), HistoryAction = nameof(History), PrintAction = nameof(History), PopupTitle = "Automatic Trade Fraction" }; viewModel.StateMaker = RequestContext.ContextUser.UserID; return(View(viewModel)); }