예제 #1
0
        void Application_Start(object sender, EventArgs e)
        {
            string connection = ConfigurationManager.ConnectionStrings["DataPump"].ConnectionString;
            string procedure = ConfigurationManager.AppSettings["GetSourceTargets"].ToString();

            var sourceTargetManager = new SourceTargetManager(connection, procedure);
            Application["SourceTargets"] = sourceTargetManager.GetSourceTargets();
        }
예제 #2
0
        private void LoadSourceTargetData()
        {
            string connection = ConfigurationManager.ConnectionStrings["DataPump"].ConnectionString;
            string procedure = ConfigurationManager.AppSettings["GetSourceTargets"].ToString();

            var sourceTargetManager = new SourceTargetManager(connection, procedure);
            var sourceTargets = sourceTargetManager.GetSourceTargets();

            //  update ImageRef so UI can display some image
            sourceTargets.ForEach(x => x.ImageRef = @"images/plus.jpg");

            this.sourceTargetData.Value = JsonConvert.SerializeObject(sourceTargets);
        }