コード例 #1
0
ファイル: LogBookAlert.cs プロジェクト: mpvyard/InsideMMA
 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();
 }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public LogBookItem(LogBookViewModel vm)
 {
     Vm = vm;
 }