Inheritance: Boo.Lang.IQuackFu
Ejemplo n.º 1
0
 public virtual void Initialize(IDictionary<string, object> inputParams)
 {
     log = LogManager.GetLogger(this.GetType().Name);
     InputParams = new QuackW(fld => inputParams[fld]);
     Prepare();
 }
Ejemplo n.º 2
0
 protected void sql_select(string connStr, string query, Action<BL.IQuackFu> act)
 {
     DbDataReader dr = null;
     var qw = new QuackW(fld =>
     {
         int ord = dr.GetOrdinal(fld);
         return dr.IsDBNull(ord) ? null : dr[ord];
     });
     access_db(connStr, delegate(DbConnection conn)
     {
         using (var cmd = conn.CreateCommand())
         {
             cmd.CommandText = query;
             using (dr = cmd.ExecuteReader())
             {
                 while (dr.Read())
                 {
                     act(qw);
                 }
             }
         }
     });
 }