Esempio n. 1
0
        private IActionResult createEdit(AccountsCreateEditModel model)
        {
            if (ModelState.IsValid)
            {
                var errors = model.CreateOrUpdate();

                addErrors(errors);
            }

            if (ModelState.IsValid)
            {
                return(RedirectToAction("Index"));
            }

            return(View("CreateEdit", model));
        }
Esempio n. 2
0
        public IActionResult Edit(String id)
        {
            if (String.IsNullOrEmpty(id))
            {
                return(RedirectToAction("Create"));
            }

            var model = new AccountsCreateEditModel(id);

            if (model.Account == null)
            {
                return(RedirectToAction("Create"));
            }

            return(View("CreateEdit", model));
        }
Esempio n. 3
0
 public IActionResult Edit(String id, AccountsCreateEditModel model)
 {
     return(createEdit(model));
 }
Esempio n. 4
0
        public IActionResult Create(AccountsCreateEditModel model)
        {
            model.Type = OperationType.Creation;

            return(createEdit(model));
        }
Esempio n. 5
0
        public IActionResult Create()
        {
            var model = new AccountsCreateEditModel();

            return(View("CreateEdit", model));
        }