Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sql"></param>
 public void RunSql(string sql, out System.Data.DataSet dataSet)
 {
     try
     {
         QLDBHelper h = new QLDBHelper(ConnectionStringMain, DBEntityProvide);
         h.RunSql(sql, out dataSet);
     }
     catch (Exception ex)
     {
         var tex = new Exception("执行SQL “" + sql + "”出现异常!", ex);
         QLSystemErrorProvide.OnQLSystemErrorHandleEvent(null, tex);
         dataSet = new DataSet();
     }
 }
Exemple #2
0
 /// <summary>
 /// 执行存储过程,返回ReturnValue
 /// </summary>
 /// <param name="storedProcName"></param>
 /// <param name="parameters"></param>
 /// <param name="dataSet"></param>
 /// <returns></returns>
 public object RunProcedure(string storedProcName, IDataParameter[] parameters, out DataSet dataSet)
 {
     try
     {
         QLDBHelper h = new QLDBHelper(ConnectionStringMain, DBEntityProvide);
         return(h.RunProcedure(storedProcName, parameters, out dataSet));
     }
     catch (Exception ex)
     {
         var tex = new Exception("调用存储过程“" + storedProcName + "”出现异常!", ex);
         QLSystemErrorProvide.OnQLSystemErrorHandleEvent(null, tex);
         dataSet = new DataSet();
         return(-10000);
     }
 }