public string getDBType(string PID) { ExcelDataBase.Database db = DbFunction.GetDB(""); return(db.DBType.Equals(DataBaseType.ORA) ? "ORA" : "MSS"); //GS_PublicVar.Dev_LoginGS(PID); //return Convert.ToString(CommonFunction.GlobalVariable["Genersoft.BS.Public.DbType"]).Trim(); }
public DataSet getDataSetProc(string processID, string ProcName, string[] paramArr, string[] valueArr) { DataSet ds = new DataSet(); // Database db = DataBaseManager.GetDB(); ExcelDataBase.Database db = DbFunction.GetDB(""); try { int paramLen = 0; DbParam[] myParam = null; if (paramArr != null) { paramLen = paramArr.Length; } if (db.DBType == DataBaseType.ORA) { paramLen = paramLen + 1; } if (paramLen > 0) { myParam = new DbParam[paramLen]; } if (paramArr != null) { for (int i = 0; i < paramArr.Length; i++) { DbParam vsparam = new DbParam(); vsparam.dataType = DataType.VarChar; vsparam.paramDirct = ParameterDirection.Input; vsparam.paramName = paramArr[i]; vsparam.paramValue = valueArr[i]; vsparam.sqlType = SqlType.Proc; myParam[i] = vsparam; } } if (db.DBType == DataBaseType.ORA) { DbParam vsparam = new DbParam(); vsparam.dataType = DataType.Cursor; vsparam.paramDirct = ParameterDirection.Output; vsparam.paramName = "Re_CURSOR"; vsparam.paramValue = ""; vsparam.sqlType = SqlType.Proc; myParam[myParam.Length - 1] = vsparam; } ds = db.ExecuteDataSet(ProcName, myParam); } catch (Exception ex) { throw ex; } return(ds); }