using System.Web; using System.Web.Optimization; namespace HealthchoiceMVC { public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCollection bundles) { BundleTable.EnableOptimizations = false; bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.validate*")); bundles.Add(new ScriptBundle("~/bundles/inputmask").Include( "~/Scripts/jquery.mask.min.js", "~/Scripts/bootstrap-datepicker.min.js")); // Use the development version of Modernizr to develop with and learn from. Then, when you're // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( "~/Scripts/bootstrap.js", "~/Scripts/respond.js")); bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap_site.css", "~/Content/Site.css", "~/Content/bootstrap-datepicker.min.css")); } } public static class Storage { public static void SessionAdd(string label, T value) { if (!string.IsNullOrEmpty(label)) HttpContext.Current.Session.Add(label, value); } public static void SessionModify(string label, T value) { if (HttpContext.Current.Session[label] != null) { HttpContext.Current.Session[label] = value; return; } SessionAdd(label, value); } public static T SessionModifyAndReturn(string label, T value) where T : class, new() { var content = new T(); if (HttpContext.Current.Session[label] != null) HttpContext.Current.Session[label] = value; else { SessionAdd(label, value); } content = value; return content; } } }