Beispiel #1
0
        /// <summary>
        ///  Initialize the Edit form.
        /// </summary>
        /// <param name="id">Pension id</param>
        /// <returns></returns>
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var pensionModel = _pensionService.GetById(id.Value);

            PopulateDropDownLists(pensionModel);

            if (pensionModel == null)
            {
                return(HttpNotFound());
            }

            return(View(pensionModel));
        }
 public PensionDetails Get(int id)
 {
     return(_PensionService.GetById(id));
 }