Exemplo n.º 1
0
 /// <summary>
 /// Returns a list of InstallmentDecreaseVw objects
 /// </summary>
 /// <returns></returns>
 public ActionResult Index(InstallmentDecreaseVwViewModel Model)
 {
     if (Model.Filter.HasCriteria)
     {
         Db db = new Db(DbServices.ConnectionString);
         Model.List = InstallmentDecreaseVwServices.Get(Model.Filter, db);
     }
     else
     {
         Model.List = new List <InstallmentDecreaseVw>();
     }
     return(View(Model));
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InstallmentDecreaseVwViewModel installmentDecreaseVwViewModel = new InstallmentDecreaseVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

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


            return(View(installmentDecreaseVwViewModel));
        }