コード例 #1
0
        public ActionResult Delete(AbscentDeduction model)
        {
            try
            {
                // TODO: Add delete logic here
                work.AbscentDeductionRepository.Delete(model);
                work.Save();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
コード例 #2
0
        public ActionResult Edit(AbscentDeduction model)
        {
            try
            {
                // TODO: Add update logic here
                if (ModelState.IsValid)
                {
                    work.AbscentDeductionRepository.Update(model);
                    work.Save();
                }

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
コード例 #3
0
        //
        // GET: /AbscentDeduction/Edit/5

        public ActionResult Edit(int id)
        {
            AbscentDeduction theDeduction = work.AbscentDeductionRepository.GetByID(id);

            return(View(theDeduction));
        }