SVN r654
SVN-Revision: r654
This commit is contained in:
@@ -1505,7 +1505,7 @@ namespace Lskj.Control.Model
|
||||
// 右键调用Lskj.PubBill.dll、Lskj.PubBillBrp,并且为多选新增,则汇总明细数据且只执行一次.
|
||||
bool isOnlyOne = (model.DllName.Equals("lskj.pubbill.dll", StringComparison.OrdinalIgnoreCase) ||
|
||||
model.DllName.Equals("lskj.pubbillbrp.dll", StringComparison.OrdinalIgnoreCase)) &&
|
||||
!string.IsNullOrEmpty(model.DllParam8) && !string.IsNullOrEmpty(model.DllParam9) && model.MoreClick;
|
||||
!string.IsNullOrEmpty(model.DllParam8) && !string.IsNullOrEmpty(model.DllParam9) && model.Mergeexec;
|
||||
if (isOnlyOne)
|
||||
{
|
||||
string fieldValue = paramList[8];
|
||||
@@ -1675,14 +1675,18 @@ namespace Lskj.Control.Model
|
||||
else
|
||||
{
|
||||
//多条合并执行时替换参数
|
||||
fieldValue = fieldValue.Replace("[", "{").Replace("]", "}");
|
||||
//先替换{},替换的是选中行的数据
|
||||
fieldValue = ReplaceHelper.ReplaceRowParam(rowData, fieldValue.Replace("#", ""));
|
||||
//替换[],替换的是多选行中的数据
|
||||
fieldValue = ReplaceHelper.ReplaceRowParam(rowDatas, fieldValue.Replace("[", "{").Replace("]", "}"), "", "");
|
||||
|
||||
//如果是sql的情况,可能有 select '[xx]' as xxx 和 where xx in([xxx]) 的情况,start和end不好统一设置,先默认为空
|
||||
//string start = "'", end = "'";
|
||||
//if (fieldValue.ToUpper().Contains("EXEC"))
|
||||
//{
|
||||
// start = end = string.Empty;
|
||||
//}
|
||||
handleParamList.Add(ReplaceHelper.ReplaceRowParam(rowDatas, fieldValue, "", "") + "");
|
||||
handleParamList.Add(fieldValue);
|
||||
}
|
||||
break;
|
||||
case "[": //[FormTitle_格式数据
|
||||
@@ -1788,4 +1792,28 @@ namespace Lskj.Control.Model
|
||||
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
|
||||
if (dataRows.Length == 0)
|
||||
{
|
||||
string a
|
||||
string addColSql = string.Format("alter table P_PrivateDllTab add {0} {1}", colunmField.Key, colunmField.Value);
|
||||
SqlHelper.ExecuteNonQuery(addColSql);//添加列
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
string createTabSql = "create table P_PrivateDllTab(id int IDENTITY(1,1) NOT NULL,{0})";
|
||||
string createCol = string.Empty;
|
||||
foreach (KeyValuePair<string, string> colunmField in colDic)
|
||||
{
|
||||
createCol += string.Format("{0} {1},", colunmField.Key, colunmField.Value);
|
||||
}
|
||||
createTabSql = string.Format(createTabSql, createCol.TrimEnd(','));
|
||||
SqlHelper.ExecuteNonQuery(createTabSql);//创建表
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user