Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InstallmentVwViewModel installmentVwViewModel = new InstallmentVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

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


            @ViewBag.SettlementVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "Settlement", "ModuleNamePlural");
            // installmentVwViewModel.SettlementVwViewModel.List = SettlementVwServices.GetByInstallmentId(id.Value, db);
            installmentVwViewModel.SettlementVwViewModel.List = installmentVwViewModel.Instance.SettlementVwList;


            return(View(installmentVwViewModel));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a list of InstallmentVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(InstallmentVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            ViewBag.ProductTypeList = new SelectList(ProductTypeServices.List(db), "Id", "Name");
            if (Model.Filter.HasCriteria)
            {
                Model.List = InstallmentVwServices.Get(Model.Filter, db);
            }
            else
            {
                Model.List = new List <InstallmentVw>();
            }
            return(View(Model));
        }