| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
-
- 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<Config> Parse(OracleDataReader reader)
- {
- List<Config> result = new List<Config>();
- 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;
- }
- }
- }
|