public static BSqlMaker getMaker(string conString, string filePath, string classPath, IHashObject queryParams) { DbHelper db = new DbHelper(conString, true); Assembly assembly = Assembly.Load("BSQLMaker"); object[] param = { db, queryParams, conString, filePath }; Type itype = assembly.GetType(classPath); object obj = Activator.CreateInstance(itype, param); BSqlMaker maker = (BSqlMaker)obj; maker.SQLFilePath = filePath; return maker; }
protected override void innerIni(DbHelper dbHelper, IHashObject qryParams) { try { if (qryParams == null) { setTestParams(); } setInnerParams(); registFuncMakers(); } catch (Exception e) { throw new Exception("BSqlMaker->innerIni: " + e.Message); } }
public BParamsPresetSql(DbHelper dbHelper, IHashObject qryParams, string conString, string sqlPath) : base(dbHelper, qryParams, conString, sqlPath) { }
public BSqlMaker(DbHelper dbHelper, IHashObject qryParams, string conString, string filePath) : base(dbHelper, qryParams, conString, filePath) { }
public BaseSQLMaker(DbHelper dbHelper, IHashObject qryParams, string conString, string filePath) { conStr = conString; this.sqlFilePath = filePath; ini(dbHelper, qryParams); }
protected abstract void innerIni(DbHelper dbHelper, IHashObject qryParams);
public void ini(DbHelper dbHelper, IHashObject qryParams) { try { this.funcMakers = new List<FunctionStrMaker>(); this.wrappers = new List<FunctionStrMaker>(); this.db = dbHelper; this.queryParams = qryParams; executeSql = new ExecuteSQL(); helper = new SQLHelper(); innerIni(dbHelper, qryParams); } catch (Exception e) { System.Windows.Forms.MessageBox.Show(e.Message); } }
public BCommonPagerSql(DbHelper dbHelper, IHashObject qryParams, string conString, string sqlPath) : base(dbHelper, qryParams, conString, sqlPath) { }