示例#1
0
        /// <summary>
        /// Returns a list of GrantTypeVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(GrantTypeVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            Model.List = GrantTypeVwServices.List(db);
            return(View(Model));
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <byte> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            GrantTypeVwViewModel grantTypeVwViewModel = new GrantTypeVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // grantTypeVwViewModel.Instance = GrantTypeVwServices.Get(id.Value, db);
            grantTypeVwViewModel.Instance = GrantTypeVwServices.GetChildren(id.Value, db);
            if (grantTypeVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            return(View(grantTypeVwViewModel));
        }