예제 #1
0
        /// <summary>
        /// Returns a list of SpecialCaseLoanVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(SpecialCaseLoanVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            ViewBag.LoanTypeProductTypeList = new SelectList(ProductTypeServices.List(db), "Id", "Name");
            if (Model.Filter.HasCriteria)
            {
                Model.List = SpecialCaseLoanVwServices.Get(Model.Filter, db);
            }
            else
            {
                Model.List = new List <SpecialCaseLoanVw>();
            }
            return(View(Model));
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpecialCaseLoanVwViewModel specialCaseLoanVwViewModel = new SpecialCaseLoanVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

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


            return(View(specialCaseLoanVwViewModel));
        }