diff --git a/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs b/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs
index ecb2b71..d535a85 100644
--- a/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs
+++ b/插件库/Lskj.Control/Model/MenuStrip/BaseMenuStrip.cs
@@ -43,6 +43,10 @@ namespace Lskj.Control.Model
///
public class BaseRightMenu
{
+ ///
+ /// 最初账套版本
+ ///
+ public DataRow AccountItem;
public DataTable MenuTable;
public DynamicModel Model;
public MyControl ControlObj;
@@ -249,10 +253,18 @@ namespace Lskj.Control.Model
/// The instance containing the event data.
protected virtual void MenuStripItemClick(object sender, EventArgs e)
{
+
ToolStripMenuItem item = sender as ToolStripMenuItem;
DXMenuItem items = sender as DXMenuItem;
GridRightMenuModel model = item == null ? items.Tag as GridRightMenuModel : item.Tag as GridRightMenuModel;
-
+ if (!string.IsNullOrEmpty(model.UnionZTid))
+ {
+ string condition = string.Format("where ShowName ='{0}'", ERPInfo.Instance.AccountBook);
+ DataTable dt = MainImpl.GetLedgerList(condition);
+ DataRow RT = BaseImpl.GetDataRowResult($"select * from p_sydbGroupTab where ID={model.UnionZTid}");
+ AccountItem = dt.Rows[0];
+ ToDBatching(RT, AccountItem);
+ }
DataRow[] rowArray = GetSelectedRows();
@@ -309,6 +321,29 @@ namespace Lskj.Control.Model
MessageUtil.Show(Message, ex.Message);
LogHelper.Instance.WriteError(ex);
}
+ finally
+ {
+ if(!string.IsNullOrEmpty(model.UnionZTid))ToDBatching(AccountItem, AccountItem);
+ }
+ }
+ ///
+ /// 启动账套数据源刷新
+ ///
+ protected void ToDBatching(DataRow RT, DataRow firstrow)
+ {
+ string serverIP = RT["IP"] + "";
+ string dbName = RT["DBName"] + "";
+ string dataBook = RT["ShowName"] + "";
+ bool isInternal = RT.Table.Columns.Contains("IsInternalNetwork") && !string.IsNullOrEmpty(RT["IsInternalNetwork"] + "") ? "1".Equals(RT["IsInternalNetwork"] + "") : false;
+ DBConfig.Instance.DataBook = dataBook;
+ DBConfig.Instance.ServerName = serverIP;
+ DBConfig.Instance.DataBase = dbName;
+ DBConfig.Instance.IsInternalNetwork = isInternal;
+ if (!DBConfig.Instance.CreateConnection())
+ {
+ ToDBatching(firstrow, firstrow);
+ }
+
}
///
/// 说明:QQ点击
@@ -383,6 +418,7 @@ namespace Lskj.Control.Model
/// true if XXXX, false otherwise.
public bool ExecRightMenu(GridRightMenuModel model, DataRow[] rows)
{
+
StaticControl.RightMenuGridView = BaseGridView;
List paramListEx = model.ParamList;
List paramList = null;
diff --git a/插件库/Lskj.Control/Model/MenuStrip/RightMenuModel.cs b/插件库/Lskj.Control/Model/MenuStrip/RightMenuModel.cs
index 90ffde4..3bbde56 100644
--- a/插件库/Lskj.Control/Model/MenuStrip/RightMenuModel.cs
+++ b/插件库/Lskj.Control/Model/MenuStrip/RightMenuModel.cs
@@ -291,6 +291,11 @@ namespace Lskj.Control.Model
/// The title label object.
public string AutomaticSearchId;
///
+ /// 关联账套id
+ ///
+ /// The title label object.
+ public string UnionZTid;
+ ///
/// 允许不选中行执行右键
///
public bool AllowNullExec { get { return _allowNullExec; } }
@@ -433,4 +438,7 @@ namespace Lskj.Control.Model
if (item.Table.Columns.Contains("AllowNullExec"))
this._allowNullExec = string.IsNullOrWhiteSpace(item["AllowNullExec"] + "") ? false : "1".Equals(item["AllowNullExec"] + "");
if (item.Table.Columns.Contains("ResultSQL"))
- this._resultSQL = ite
\ No newline at end of file
+ this._resultSQL = item["ResultSQL"] + "";
+ if (item.Table.Columns.Contains("ExecuteFirstCode"))
+ this.ExecuteFirstCode = item["ExecuteFirstCode"] + "";
+ if
\ No newline at end of file