Ejemplo n.º 1
0
        /// <summary>
        /// Returns a list of EndWorkGrantBracketVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(EndWorkGrantBracketVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            Model.List = EndWorkGrantBracketVwServices.List(db);
            return(View(Model));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <byte> fromYear)
        {
            if (fromYear == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EndWorkGrantBracketVwViewModel endWorkGrantBracketVwViewModel = new EndWorkGrantBracketVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // endWorkGrantBracketVwViewModel.Instance = EndWorkGrantBracketVwServices.Get(fromYear.Value, db);
            endWorkGrantBracketVwViewModel.Instance = EndWorkGrantBracketVwServices.GetChildren(fromYear.Value, db);
            if (endWorkGrantBracketVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            return(View(endWorkGrantBracketVwViewModel));
        }