/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <short> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AvailabilityVwViewModel availabilityVwViewModel = new AvailabilityVwViewModel(); Db db = new Db(DbServices.ConnectionString); // availabilityVwViewModel.Instance = AvailabilityVwServices.Get(id.Value, db); availabilityVwViewModel.Instance = AvailabilityVwServices.GetChildren(id.Value, db); if (availabilityVwViewModel.Instance == null) { return(HttpNotFound()); } @ViewBag.AvailabilityCeilingVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "AvailabilityCeiling", "ModuleNamePlural"); // availabilityVwViewModel.AvailabilityCeilingVwViewModel.List = AvailabilityCeilingVwServices.GetByAvailabilityId(id.Value, db); availabilityVwViewModel.AvailabilityCeilingVwViewModel.List = availabilityVwViewModel.Instance.AvailabilityCeilingVwList; @ViewBag.ProductTypeAvailabilityVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "ProductTypeAvailability", "ModuleNamePlural"); // availabilityVwViewModel.ProductTypeAvailabilityVwViewModel.List = ProductTypeAvailabilityVwServices.GetByAvailabilityId(id.Value, db); availabilityVwViewModel.ProductTypeAvailabilityVwViewModel.List = availabilityVwViewModel.Instance.ProductTypeAvailabilityVwList; return(View(availabilityVwViewModel)); }
/// <summary> /// Returns a list of AvailabilityVw objects /// </summary> /// <returns></returns> public ActionResult Index(AvailabilityVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); Model.List = AvailabilityVwServices.List(db); return(View(Model)); }