예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // *** On callbacks we don't need to populate any data since they are
            // *** raw method calls. Callback routes to parser from here
            if (Callback.IsCallback)
            {
                return;
            }

            // create a localRes object in JavaScript so reosurces are available
            // on the client
            JavaScriptResourceHandler.RegisterJavaScriptLocalResources(this, "localRes");

            SetControlId();


            if (btnCreateTable.Visible)
            {
                imgCreateTable.Visible = true;
            }

            //// *** Check if resources are properly active if not we have a
            ////     problem and need to let user know
            //if (WebUtils.LRes("BackupComplete") == "BackupComplete")
            //{
            //    // *** Not localized so it's always visible!!!
            //    this.ErrorDisplay.DisplayTimeout = 0;
            //    this.ErrorDisplay.ShowError("Resources are not available for this site. Most likely this means you have enabled the DbResourceProvider without first importing resources or that your database connection is not properly configured.<p/>" +
            //                                "Please make sure you run this form without the DbResourceProvider enabled and ensure you have created the resource table and imported Resx resources of the site. <p />" +
            //                                "For more information please check the following configuration link: <p />" +
            //                                "<a href='http://www.west-wind.com/WestwindWebToolkit/docs/?page=_1xl057dta.htm'>Using the the DbResourceProvider Documentation</a>");
            //}
        }
 public LocalizationAdminController(IDbResourceDataManager manager, IHostingEnvironment hostingEnvironment,
                                    DbResourceConfiguration configuration, JavaScriptResourceHandler javaScriptResourceHandler)
 {
     this.manager                            = manager;
     this.hostingEnvironment                 = hostingEnvironment;
     this.configuration                      = configuration;
     this.javaScriptResourceHandler          = javaScriptResourceHandler;
     jsonSerializerSettings                  = JsonSerializerSettingsProvider.CreateSerializerSettings();
     jsonSerializerSettings.ContractResolver = new DefaultContractResolver();
 }