Ejemplo n.º 1
0
        }                                                     // todo: use it during the login to set the CurrentConnectionString

        protected void Page_Load(object sender, EventArgs e)
        {
            // todo: call these method during the login phase, when the user selects the current database name.
            SessionProvider.Store("CurrentConnectionString", "Sample07Context");
            UoW.SetConnectionString(WebConfigurationManager.ConnectionStrings[SessionProvider.Get <string>("CurrentConnectionString")].ConnectionString);


            if (!IsPostBack)
            {
                GridView1.DataSource = ProductService.GetAllProducts();
                GridView1.DataBind();
            }
        }