コード例 #1
0
ファイル: Program.cs プロジェクト: kri26/SUBDlaba5
        static int ScriptInsert2()
        {
            Money model = new Money()
            {
                Currency = "RUB", Amount = 1000, WorkerMoney = 1
            };

            DateTime startTime = DateTime.Now;

            MoneyService.Create(model);
            DateTime finishTime = DateTime.Now;

            return((int)(finishTime - startTime).TotalMilliseconds);
        }
コード例 #2
0
        public ActionResult Create(MoneyCreateViewModel NewMoney)
        {
            if (ModelState.IsValid)
            {
                NewMoney.Id = Guid.NewGuid();
                _moneyService.Create(NewMoney);
                _moneyService.Save();
            }

            ViewBag.Category = _moneyService.GetCategoryItems();

            ShowMoneyListViewModel MoneyList = new ShowMoneyListViewModel();

            MoneyList.MyMoney     = _moneyService.DisplayPagedData(1, pageSize);
            ViewData["MoneyData"] = MoneyList;

            return(View());
        }