Exemple #1
0
        public ActionResult Edit(Account m)
        {
            AccountVM vm = new AccountVM();

            vm.Update(m);
            ViewBag.Succesmessage = "Edycja pomyślna!";
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public void TestUpdate()
        {
            AccountVM accountVM = new AccountVM(50, 0);

            accountVM.GetAccount(-100);

            accountVM.CurrentAccount.Shortname = "Иванов";

            accountVM.Update();

            accountVM.GetAccount(-100);

            Assert.AreEqual("Иванов", accountVM.CurrentAccount.Shortname);
        }