public LogBookAlert(LogBookViewModel vm, string buysell, double price, int size, double delta) { Vm = vm; Buysell = buysell; Price = price; Board = vm.Board; Seccode = vm.Seccode; Delta = delta; Size = size.ToString(); }
public async Task <IActionResult> AddLogBookToEntity(LogBookViewModel model) { try { await _entityService. CreateLogBookAsync(model.Title, model.EstablishmentId); return(RedirectToAction(nameof(AdministerEntity), new { id = model.EstablishmentId })); } catch (ArgumentException ex) { this.ModelState.AddModelError("Error", ex.Message); return(View(nameof(AdministerEntity), model)); } }
public async Task<IActionResult> Index(LogBookViewModel viewModel) { var id = UserIDSess; if (id == null) { return NotFound(); } var user = await _context.Users.FindAsync(id); viewModel.UserId = user.UserID; viewModel.Logs = user.Logs; return View(viewModel); }
public LogBookItem(LogBookViewModel vm) { Vm = vm; }