SVN r809
SVN-Revision: r809
This commit is contained in:
@@ -43,6 +43,10 @@ namespace Lskj.Control.Model
|
||||
/// </summary>
|
||||
public class BaseRightMenu
|
||||
{
|
||||
/// <summary>
|
||||
/// 最初账套版本
|
||||
/// </summary>
|
||||
public DataRow AccountItem;
|
||||
public DataTable MenuTable;
|
||||
public DynamicModel Model;
|
||||
public MyControl ControlObj;
|
||||
@@ -249,10 +253,18 @@ namespace Lskj.Control.Model
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 启动账套数据源刷新
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:QQ点击</para>
|
||||
@@ -383,6 +418,7 @@ namespace Lskj.Control.Model
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
public bool ExecRightMenu(GridRightMenuModel model, DataRow[] rows)
|
||||
{
|
||||
|
||||
StaticControl.RightMenuGridView = BaseGridView;
|
||||
List<string> paramListEx = model.ParamList;
|
||||
List<string> paramList = null;
|
||||
|
||||
@@ -291,6 +291,11 @@ namespace Lskj.Control.Model
|
||||
/// <value>The title label object.</value>
|
||||
public string AutomaticSearchId;
|
||||
/// <summary>
|
||||
/// 关联账套id
|
||||
/// </summary>
|
||||
/// <value>The title label object.</value>
|
||||
public string UnionZTid;
|
||||
/// <summary>
|
||||
/// 允许不选中行执行右键
|
||||
/// </summary>
|
||||
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
|
||||
this._resultSQL = item["ResultSQL"] + "";
|
||||
if (item.Table.Columns.Contains("ExecuteFirstCode"))
|
||||
this.ExecuteFirstCode = item["ExecuteFirstCode"] + "";
|
||||
if
|
||||
Reference in New Issue
Block a user