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(); }
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); }