SVN-Revision: r290
This commit is contained in:
cyf
2025-02-27 08:30:36 +00:00
parent d505d86cc0
commit 32f7cb9806
7 changed files with 95 additions and 201 deletions
+2 -31
View File
@@ -248,7 +248,6 @@ namespace Lskj.Control
this.treeLeft.Visible = false;
this.treeGridLeft.Expansion = this.SysModel.TreeTableExpand;
this.ModuleGridObj.TreeExactQuery = this.SysModel.TreeExactQuery;
}
this.ModuleGridObj.LeftGridEx = this.SysModel.IsTreeTable ? this.treeGridLeft : this.gridLeft;
@@ -1084,7 +1083,7 @@ namespace Lskj.Control
//设置上一次选中节点,没有保存的节点就默认选中第一个
this.treeGridLeft.TreeListObj.FocusedNode = treeListNode != null ? treeListNode : this.treeGridLeft.TreeListObj.Nodes[0];
//保存右侧主表
this.ModuleGridObj.SaveGridRecord(false);
this.ModuleGridObj.SaveWhenSwitching();
//恢复点击节点
//this.treeGridLeft.TreeListObj.FocusedNode = currentNode;
this.treeGridLeft.TreeListObj.FocusedNode = this.treeGridLeft.TreeListObj.GetNodeByVisibleIndex(lastNodeIndex);
@@ -1525,32 +1524,4 @@ namespace Lskj.Control
using (BinaryReader r = new BinaryReader(fs))
{
byte[] buffer = r.ReadBytes((int)fs.Length);
int Result = BaseModuleImpl.SaveImage(this.SysModel.MenuTable, _labPicName, this.SysModel.ParmaryKey, this._currentRow[this.SysModel.ParmaryKey] + "", buffer);
MessageUtil.Show(Result > 0 ? ResourceKeys.SaveSuccess : ResourceKeys.SaveFault);
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// 判断是否是selete开头(可以处理sql前方有注释和空格的情况)
/// </summary>
/// <param name="sqlText"></param>
/// <returns></returns>
public static bool IsSelectAtStart(string sqlText)
{
// Remove comments and whitespace at the start of the text
string cleanedText = Regex.Replace(sqlText, @"^(\s*--.*?(\r\n|\n)|\s*)*", "");
// Check if the remaining text starts with 'select'
return cleanedText.StartsWith("select", StringComparison.OrdinalIgnoreCase);
}
}
}
int Result = BaseModuleImpl.SaveImage(this.SysModel.MenuTable, _labPicName, this.SysModel.ParmaryKey, this._currentRow[this.SysModel.ParmaryK