コード例 #1
0
        public ActionResult Edit(TypeJobsName typeJobName)
        {
            if (ModelState.IsValid)
            {
                _unitOfWork.TypeJobsNameRepository.Edit(typeJobName);
                return(RedirectToAction("Index", "TypeJobName"));
            }

            return(View(typeJobName));
        }
コード例 #2
0
        public ActionResult Create(FormCollection typeJobName)
        {
            var job   = typeJobName["TypeJobName"];
            var model = new TypeJobsName()
            {
                TypeJobName = job
            };

            if (ModelState.IsValid)
            {
                _unitOfWork.TypeJobsNameRepository.Add(model);
                return(RedirectToAction("Index", "TypeJobName"));
            }

            return(View(model));
        }
コード例 #3
0
        // GET: TypeJobName/Create
        public ActionResult Create()
        {
            var typeJobName = new TypeJobsName();

            return(View(typeJobName));
        }