예제 #1
0
        // GET: Supplier/Create
        public ActionResult SupplierCreate()
        {
            var vm = new SupplierCreateEditViewModel()
            {
            };

            return(View(vm));
        }
예제 #2
0
        public ActionResult SupplierCreate(SupplierCreateEditViewModel vm)
        {
            if (ModelState.IsValid)
            {
                _purchaseUow.Suppliers.Add(vm.Supplier);
                _purchaseUow.Commit();

                return(RedirectToAction("Create"));
            }
            return(View(vm));
        }