/// <summary> /// Clears stored information and removes the provider screens. /// </summary> public override void Clear() { if (TheBllDatabase != null) { TheBllDatabase = null; } TheBllDatabase = new BLL.Database(); TablePrefixes.Clear(); ViewPrefixes.Clear(); StoredProcedurePrefixes.Clear(); foreach (ContentItem contentIten in Screens) { contentIten.Clear(); } if (Screens != null && Screens.Length >= 2) { Screens[0] = null; Screens[1] = null; Screens = null; } }
private static void GetXmlSettings(string xmlFile) { XmlDocument doc = new XmlDocument(); doc.Load(xmlFile); string[] prefixes = doc.SelectSingleNode("database_provider_settings/table_prefixes").InnerText.Split('|'); foreach (string prefix in prefixes) { if (!string.IsNullOrEmpty(prefix)) { TablePrefixes.Add(prefix); } } prefixes = doc.SelectSingleNode("database_provider_settings/view_prefixes").InnerText.Split('|'); foreach (string prefix in prefixes) { if (!string.IsNullOrEmpty(prefix)) { ViewPrefixes.Add(prefix); } } prefixes = doc.SelectSingleNode("database_provider_settings/stored_procedure_prefixes").InnerText.Split('|'); foreach (string prefix in prefixes) { if (!string.IsNullOrEmpty(prefix)) { StoredProcedurePrefixes.Add(prefix); } } Model.Table.TablePrefixes = TablePrefixes; Model.View.ViewPrefixes = ViewPrefixes; Model.StoredProcedure.StoredProcedurePrefixes = StoredProcedurePrefixes; }