using System; using System.Collections.Generic; using Oracle.ManagedDataAccess.Client; using System.Linq; using System.Web; namespace ReportWeb.Models { public class Config { public Config() { // // TODO: Add constructor logic here // } public string module { get; set; } public string param_name { get; set; } public string param_value_0 { get; set; } public static List Parse(OracleDataReader reader) { List result = new List(); try { while (reader.Read()) { Config sv = new Config(); for (int i = 0; i < reader.FieldCount; i++) { if (reader.GetName(i).ToLower() == "module") { try { sv.module = reader.GetValue(i).ToString(); } catch { } } else if (reader.GetName(i).ToLower() == "param_name") { try { sv.param_name = reader.GetValue(i).ToString(); } catch { } } else if (reader.GetName(i).ToLower() == "param_value_0") { try { sv.param_value_0 = reader.GetValue(i).ToString(); } catch { } } } result.Add(sv); } reader.Close(); } catch { } finally { try { reader.Close(); } catch { } } return result; } } }