/// <summary> /// Read the Stuff from the initialization file /// </summary> private void Initialize() { try { XmlNode scratch; XmlDocument doc = new System.Xml.XmlDocument(); doc.Load(m_xmlfile); XmlNode config_nd = doc.SelectSingleNode("CONFIG"); scratch = config_nd.SelectSingleNode("DECIMAL_ROUNDING"); GlobalSettings.AddEntry("DECIMAL_ROUNDING", Convert.ToInt32(scratch.InnerText)); scratch = config_nd.SelectSingleNode("ALLOW_EMAILS"); GlobalSettings.AddEntry("ALLOW_EMAILS", scratch.InnerText); scratch = config_nd.SelectSingleNode("QUARANTINE_SHEETS"); GlobalSettings.AddEntry("QUARANTINE_SHEETS", scratch.InnerText); scratch = config_nd.SelectSingleNode("BACKUP_SHEETS"); GlobalSettings.AddEntry("BACKUP_SHEETS", scratch.InnerText); scratch = config_nd.SelectSingleNode("EVENT_LOGGING"); GlobalSettings.AddEntry("EVENT_LOGGING", scratch.InnerText); // // Retrieve notification parameters // // XmlNode notify_nd = config_nd.SelectSingleNode("NOTIFICATION"); scratch = notify_nd.SelectSingleNode("EMAIL_LIST"); XmlNodeList iter = scratch.ChildNodes; foreach (XmlNode rnode in iter) { notify.AddEmail(rnode.InnerText); } scratch = notify_nd.SelectSingleNode("SUBJECT_SUCCESS"); notify.SubjectSuccess = scratch.InnerText; scratch = notify_nd.SelectSingleNode("SUBJECT_FAILURE"); notify.SubjectFailure = scratch.InnerText; scratch = notify_nd.SelectSingleNode("SMTPSERVER"); notify.Server = scratch.InnerText; scratch = notify_nd.SelectSingleNode("SENDER"); notify.From = scratch.InnerText; // // // Retrieve oracle string // // XmlNode retr_node = config_nd.SelectSingleNode("ORACLE_CONNECTION_STRING"); GlobalSettings.AddEntry("ORACLE_CONNECTION_STRING", retr_node.InnerText); retr_node = config_nd.SelectSingleNode("SCRIPT"); GlobalSettings.AddEntry("VALIDATION_SCRIPT", retr_node.InnerText); retr_node = config_nd.SelectSingleNode("FORECAST_PATH"); GlobalSettings.AddEntry("FORECAST_PATH", retr_node.InnerText); ProcessForeCastPath(retr_node); m_rootPath = retr_node.InnerText; retr_node = config_nd.SelectSingleNode("EXCEL_CONNECTION_STRING"); XmlNode temp_node = retr_node.SelectSingleNode("PROVIDER"); GlobalSettings.AddEntry("EXCEL_PROVIDER", temp_node.InnerText); temp_node = retr_node.SelectSingleNode("PROPERTIES"); GlobalSettings.AddEntry("EXCEL_PROPERTIES", temp_node.InnerText); } catch (Exception e) { CSyntaxErrorLog.AddLine(e.ToString()); throw e; } }