コード例 #1
0
        public void HorizonNaviNetScript()
        {
            var code = new StringBuilder()
                       .Append(NaviNet.LoginScript(IEVersion.GetIEVersion()[10]))
                       .Append(NaviNet.HorizonNJ.GotoHorizonSubmitPage());

            Console.WriteLine(code);
        }
コード例 #2
0
        public async Task Create_Script_Record_Test()
        {
            var             version            = IEVersion.GetIEVersion();
            Action <object> writeOut           = value => Console.WriteLine(value);
            var             scriptVariablesMap = StaticHelpers.GetScriptVairableMap();

            var scripts            = new List <Script>();
            var websiteDescription = "Horizon NJ Health via NaviNet Submit ";
            var websiteKey         = new Guid("6af63ad0-66cf-4b64-9042-38f061ce5cbd");
            var deviceId           = "NJHorizon";

            var loginScript = Script.CreateScript
                              (
                websiteDescription + "001: Login, onlogin error check",
                NaviNet.LoginScript(version[9]).ToString(),
                string.Concat(deviceId, "_001"),
                "Login",
                websiteKey
                              );

            scripts.Add(loginScript);


            var script5 = Script.CreateScript(
                websiteDescription + "004: Pause for Submit",
                NaviNet.Pause().ToString(),
                string.Concat(deviceId, "_004"),
                "Extraction",
                websiteKey
                );

            scripts.Add(script5);

            Func <Script, string, Task <Guid> > AddScriptMasterRecord = async(sm, connectionString) =>
            {
                using (IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings[connectionString].ConnectionString))
                {
                    var container = new UnityContainer();
                    container.RegisterType <IScriptCreation, ScriptCreationRepo>(new InjectionConstructor(db));
                    var repo = container.Resolve <IScriptCreation>();
                    return(await repo.CreateScritp(sm));
                }
            };
        }