SVN r1138

SVN-Revision: r1138
This commit is contained in:
cyf
2026-03-19 09:47:10 +00:00
parent 2352b79793
commit 814b2a8559
9 changed files with 400 additions and 76 deletions
@@ -287,6 +287,20 @@ namespace Lskj.Control.Model
return;
}
if (model.VerifyUpdate && BaseGridView!=null)
{
for (int i = 0; i < BaseGridView.DataRowCount; i++)
{
var row = BaseGridView.GetDataRow(i);
if (row != null && (row.RowState == DataRowState.Added || row.RowState == DataRowState.Modified))
{
MessageUtil.Show("有数据未保存,请先保存后在执行右键");
return;
}
}
}
if (rowArray.Length == 0 && model.IsMustSelectRow())
{
MessageUtil.Show(ResourceKeys.SelectRowIsNull);
@@ -908,7 +922,14 @@ namespace Lskj.Control.Model
result = 0;
if (result == 0)
{
SqlStoredProcedurepPrompt.GenerateProcedureExecutionScript(procName, paramList, isFirstFlag, comfirmFlag);
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
{
SqlStoredProcedurepPrompt.GenerateProcedureExecutionScript(procName, paramList, isFirstFlag, comfirmFlag);
}
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
{
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
}
}
}
finally
@@ -929,7 +950,14 @@ namespace Lskj.Control.Model
case -1:
if (rValue == -1)
{
SqlStoredProcedurepPrompt.GenerateProcedureExecutionScript(procName, paramList, isFirstFlag, comfirmFlag);
if (SqlHelper.ConnectionType == ConnectionType.SqlServer)
{
SqlStoredProcedurepPrompt.GenerateProcedureExecutionScript(procName, paramList, isFirstFlag, comfirmFlag);
}
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
{
SqlStoredProcedurepPrompt.GenerateBillSaveScript_DM(SqlHelper.LastFailureSql);
}
}
MessageUtil.Show(string.IsNullOrEmpty(model.ErrorMsg) ? ResourceKeys.OperFault + "\n" + pMsg.Value : model.ErrorMsg);
reaultValue = false;
@@ -1118,7 +1146,8 @@ namespace Lskj.Control.Model
paramList[9],
paramList[10],
paramList[11],
paramList[12]//固定添加行数据json字符串
paramList[12],
paramList[13]//固定添加行数据json字符串
};
XtraTabPage xtraTab = ERPInfo.Instance.PageControl != null ? ERPInfo.Instance.PageControl.SelectedTabPage : null;
DllModule module = new DllModule
@@ -1915,11 +1944,8 @@ namespace Lskj.Control.Model
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;
//}
//ReplaceHelper.ReplaceMultipleLinesParam (rowData, fieldValue); 区分了2种情况
handleParamList.Add(fieldValue);
}
break;
@@ -2026,28 +2052,4 @@ namespace Lskj.Control.Model
DataRow[] dataRows = columnsTab.Select().Where(n => (n["name"] + "").Equals(colunmField.Key)).ToArray();
if (dataRows.Length == 0)
{
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;
}
}
}
}
string a
@@ -53,6 +53,7 @@ namespace Lskj.Control.Model
private string _dllParam10;
private string _dllParam11;
private string _dllParam12;
private string _dllParam13;
private bool _isCopy;
private bool _isModal;
private bool _forbiddenDisplay;
@@ -242,6 +243,11 @@ namespace Lskj.Control.Model
/// <value>The DLL param12.</value>
public string DllParam12 { get { return _dllParam12; } }
/// <summary>
/// Gets the DLL param13.
/// </summary>
/// <value>The DLL param13.</value>
public string DllParam13 { get { return _dllParam13; } }
/// <summary>
/// 在mes中,是否直接执行
/// </summary>
public bool isStartRun;
@@ -332,6 +338,10 @@ namespace Lskj.Control.Model
/// </summary>
/// <value>The menu cond.</value>
public string ClickCond;
/// <summary>
/// 右键验证是否有修改后的数据
/// </summary>
public bool VerifyUpdate;
/// <summary>
@@ -359,7 +369,7 @@ namespace Lskj.Control.Model
{
_dllParam1, _dllParam2, _dllParam3, _dllParam4, _dllParam5,
_dllParam6, _dllParam7, _dllParam8, _dllParam9, _dllParam10,
_dllParam11,_dllParam12
_dllParam11,_dllParam12,_dllParam13
}.ToList();
}
else
@@ -408,6 +418,7 @@ namespace Lskj.Control.Model
this._dllParam10 = item["dllpar10"] + "";
this._dllParam11 = item.Table.Columns.Contains("dllpar11") ? item["dllpar11"] + "" : "";
this._dllParam12 = item.Table.Columns.Contains("dllpar12") ? item["dllpar12"] + "" : "";
this._dllParam13 = item.Table.Columns.Contains("dllpar13") ? item["dllpar13"] + "" : "";
this._menuCond = item["menuCond"] + "";
this._refreshCheckState = item.Table.Columns.Contains("refreshCheckState") && !string.IsNullOrEmpty(item["refreshCheckState"] + "") ? "1".Equals(item["refreshCheckState"] + "") : false;
@@ -458,4 +469,6 @@ namespace Lskj.Control.Model
this.DuringExecutionMinimize = string.IsNullOrWhiteSpace(item["DuringExecutionMinimize"] + "") ? false : "1".Equals(item["DuringExecutionMinimize"] + "");
if (item.Table.Columns.Contains("SqlDirectExecution"))
this.SqlDirectExecution = string.IsNullOrWhiteSpace(item["SqlDirectExecution"] + "") ? false : "1".Equals(item["SqlDirectExecution"] + "");
if (item
if (item.Table.Columns.Contains("UnionZTid"))
this.UnionZTid = string.IsNullOrWhiteSpace(item["UnionZTid"] + "") ? "" : item["UnionZTid"] + "";
if (item.Table.Columns.Contains("Di