コード例 #1
0
        public ActionResult Edit(StatusVM model)
        {
            string msg = "";

            if (ModelState.IsValid)
            {
                bool success = _sRepo.EditStatus(model, out msg);
                if (success)
                {
                    TempData["SuccessMsg"] = msg;
                    return(RedirectToAction("Details", new { id = model.StatusID }));
                }
                else
                {
                    TempData["ErrorMsg"] = msg;
                }
            }
            StatusVM status = _sRepo.GetStatus(model.StatusID);

            return(View(status));
        }