/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <int> product) { if (product == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RefundableProductVwViewModel refundableProductVwViewModel = new RefundableProductVwViewModel(); Db db = new Db(DbServices.ConnectionString); // refundableProductVwViewModel.Instance = RefundableProductVwServices.Get(product.Value, db); refundableProductVwViewModel.Instance = RefundableProductVwServices.GetChildren(product.Value, db); if (refundableProductVwViewModel.Instance == null) { return(HttpNotFound()); } @ViewBag.GuarantorVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "Guarantor", "ModuleNamePlural"); // refundableProductVwViewModel.GuarantorVwViewModel.List = GuarantorVwServices.GetByRefundableProductId(product.Value, db); refundableProductVwViewModel.GuarantorVwViewModel.List = refundableProductVwViewModel.Instance.GuarantorVwList; @ViewBag.InstallmentVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "Installment", "ModuleNamePlural"); // refundableProductVwViewModel.InstallmentVwViewModel.List = InstallmentVwServices.GetByRefundableProductId(product.Value, db); refundableProductVwViewModel.InstallmentVwViewModel.List = refundableProductVwViewModel.Instance.InstallmentVwList; return(View(refundableProductVwViewModel)); }
/// <summary> /// Returns a list of RefundableProductVw objects /// </summary> /// <returns></returns> public ActionResult Index(RefundableProductVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); ViewBag.ProductTypeList = new SelectList(LoanTypeVwServices.List(db), "ProductTypeId", "ProductTypeName"); if (Model.Filter.HasCriteria) { Model.List = RefundableProductVwServices.Get(Model.Filter, db); } else { Model.List = new List <RefundableProductVw>(); } return(View(Model)); }