예제 #1
0
        protected void Application_Start()
        {
            DevExtremeBundleConfig.RegisterBundles(BundleTable.Bundles);
            FontAwesomeBundleConfig.RegisterBundles();
            OnStart();
            //illi 25.12.1012   Logger4SendingEMail.InitLogger();
            //IoC.Resolve<ICurrentLanguage>().Set("EN");
            ModelBinders.Binders.DefaultBinder = new DevExpress.Web.Mvc.DevExpressEditorsBinder();
            //Database.SetInitializer<FoxSecDBContext>(new DropCreateDatabaseIfModelChanges<FoxSecDBContext>());
            Database.SetInitializer <FoxSecDBContext>(null);
            GetSerFlashDisk();
            if (string.IsNullOrEmpty(flashlicstatus))
            {
                GetSerHardDisk();
                if (string.IsNullOrEmpty(hardlicstatus))
                {
                    CreateLicFile();
                }
            }
            else
            {
                string strpath = Path.Combine(flashdrive + @"\FoxSecLicense.ini");
                con.Open();
                SqlCommand cmd = new SqlCommand("select id from classificatorvalues where Value='Licence Path'", con);
                int?       tc  = Convert.ToInt32(cmd.ExecuteScalar());
                if (tc != null && tc > 0)
                {
                    SqlCommand cmdi = new SqlCommand("update ClassificatorValues set Comments='" + strpath + "' where id='" + tc + "'", con);
                    cmdi.ExecuteNonQuery();
                }
                con.Close();
            }
            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("select count(*) from Classificators where Description='T&A report main company name'", con);
                int        tc  = Convert.ToInt32(cmd.ExecuteScalar());
                if (tc == 0)
                {
                    SqlCommand cmd1 = new SqlCommand("insert into Classificators(Description)values('T&A report main company name')", con);
                    cmd1.ExecuteNonQuery();

                    SqlCommand cmd2 = new SqlCommand("select id from Classificators where Description = 'T&A report main company name'", con);
                    string     id   = Convert.ToString(cmd2.ExecuteScalar());

                    SqlCommand cmd3 = new SqlCommand("insert into ClassificatorValues(ClassificatorId,Value,SortOrder)values('" + id + "','FoxSec',0)", con);
                    cmd3.ExecuteNonQuery();
                }
                con.Close();
            }
            catch
            {
            }
        }
예제 #2
0
        // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                            "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at https://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"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                            "~/Content/bootstrap.css",
                            "~/Content/site.css"));

            FontAwesomeBundleConfig.RegisterBundles();
        }