SVN r1137
SVN-Revision: r1137
This commit is contained in:
@@ -3,11 +3,13 @@
|
||||
* 执行存储过程报错(return -1 时)
|
||||
* 把对应执行的存储过程(exec xxx )记录到剪切板中
|
||||
*/
|
||||
using Lskj.Core;
|
||||
using Lskj.Model;
|
||||
using Lskj.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -483,4 +485,37 @@ SELECT 'return' = @returnValue, 'msg' = @msg;";
|
||||
/// </summary>
|
||||
private static string EscapeSqlString(string input)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(input))
|
||||
return string.Empty;
|
||||
|
||||
// 将单引号替换为两个单引号,适应SQL Server的字符串格式
|
||||
return input.Replace("'", "''");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查存储过程是否包含指定参数(模拟原方法中的syscolumns查询)
|
||||
/// </summary>
|
||||
/// <param name="procedureName">存储过程名称</param>
|
||||
/// <param name="parameterName">参数名称</param>
|
||||
/// <returns>如果存在返回true,否则返回false</returns>
|
||||
private static bool CheckIfProcedureHasParameter(string procedureName, string parameterName)
|
||||
{
|
||||
DataTable dt = BaseImpl.GetDataTableResult(string.Format("select * from syscolumns where id =object_id('{0}') and name='{1}'", procedureName, parameterName));
|
||||
if (dt != null && dt.Rows.Count > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//单据保存(达梦)
|
||||
public static void GenerateBillSaveScript_DM(string detailSql, string Dmsql, string detailTable, string detailGuid)
|
||||
{
|
||||
try
|
||||
{
|
||||
string script
|
||||
Reference in New Issue
Block a user