SVN r1000
SVN-Revision: r1000
This commit is contained in:
@@ -354,17 +354,27 @@ namespace Lskj.Control
|
||||
}
|
||||
else
|
||||
{
|
||||
//树结构默认为节点改变事件
|
||||
if (this.ModuleGridObj.GridControlObj is TreeGridControlEx)
|
||||
{
|
||||
(this.ModuleGridObj.GridControlObj as TreeGridControlEx).TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
if (this.ModuleGridObj.GridControlObj is TreeBandedGridControlEx)
|
||||
{
|
||||
(this.ModuleGridObj.GridControlObj as TreeBandedGridControlEx).TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupBandEx != null)
|
||||
{
|
||||
this.ModuleGridObj.GridControlObj.CustomGroupBandEx.GridView.DoubleClick += new EventHandler(OnGridViewDoubleClick);
|
||||
}
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupTreeBandEx != null)
|
||||
{
|
||||
this.ModuleGridObj.GridControlObj.CustomGroupTreeBandEx.TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
|
||||
// 非拖拽模式
|
||||
if (Model.IsBaseModule)
|
||||
{
|
||||
if (this.ModuleGridObj.GridControlObj is TreeGridControlEx)
|
||||
{
|
||||
(this.ModuleGridObj.GridControlObj as TreeGridControlEx).TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
if (this.ModuleGridObj.GridControlObj is TreeBandedGridControlEx)
|
||||
{
|
||||
(this.ModuleGridObj.GridControlObj as TreeBandedGridControlEx).TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
if (this.SysModel.DoubleClickDetail)
|
||||
{
|
||||
//双击刷新的话,和行改变事件冲突。
|
||||
@@ -381,12 +391,6 @@ namespace Lskj.Control
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupBandEx != null)
|
||||
{
|
||||
this.ModuleGridObj.GridControlObj.CustomGroupBandEx.GridView.DoubleClick += new EventHandler(OnGridViewDoubleClick);
|
||||
//this.ModuleGridObj.GridControlObj.CustomGroupBandEx.GridView.MouseDown += new MouseEventHandler(GridView_MouseDown);
|
||||
//this.ModuleGridObj.GridControlObj.CustomGroupBandEx.GridView.FocusedRowObjectChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventHandler(OnGridViewFocusedRowObjectChanged);
|
||||
}
|
||||
this.ModuleGridObj.GridControlObj.GridView.FocusedRowObjectChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventHandler(OnGridViewFocusedRowObjectChanged);
|
||||
//this.ModuleGridObj.GridControlObj.GridView.RowCellClick += new RowCellClickEventHandler(GridView_RowCellClick);
|
||||
this.ModuleGridObj.GridControlObj.GridView.MouseDown += new MouseEventHandler(GridView_MouseDown);
|
||||
@@ -400,14 +404,7 @@ namespace Lskj.Control
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.ModuleGridObj.GridControlObj is TreeGridControlEx)
|
||||
{
|
||||
(this.ModuleGridObj.GridControlObj as TreeGridControlEx).TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
if (this.ModuleGridObj.GridControlObj is TreeBandedGridControlEx)
|
||||
{
|
||||
(this.ModuleGridObj.GridControlObj as TreeBandedGridControlEx).TreeListObj.FocusedNodeChanged += OnFocusedNodeChanged;
|
||||
}
|
||||
|
||||
if (SystemInfo.Instance.ReportMainTabClickRefresh)
|
||||
{
|
||||
if (this.SysModel.DoubleClickDetail)
|
||||
@@ -453,10 +450,11 @@ namespace Lskj.Control
|
||||
else
|
||||
{
|
||||
DataRow rowItem = this.ModuleGridObj.GridControlObj.GetViewFocusedDataRow();
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupBandEx != null)
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupSelectedRow != null)
|
||||
{
|
||||
rowItem = this.ModuleGridObj.GridControlObj.CustomGroupBandEx.GetViewFocusedDataRow();
|
||||
rowItem = this.ModuleGridObj.GridControlObj.CustomGroupSelectedRow;
|
||||
}
|
||||
|
||||
if (RefreshDetail)
|
||||
{
|
||||
XtraTabPage RefreshPage = this.TabObj.SelectedTabPage;
|
||||
@@ -663,9 +661,9 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
DataRow rowItem = this.ModuleGridObj.GridControlObj.GetViewFocusedDataRow();
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupBandEx != null)
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupSelectedRow != null)
|
||||
{
|
||||
rowItem = this.ModuleGridObj.GridControlObj.CustomGroupBandEx.GetViewFocusedDataRow();
|
||||
rowItem = this.ModuleGridObj.GridControlObj.CustomGroupSelectedRow;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(SysModel.PageVisbleCond))
|
||||
{
|
||||
@@ -894,9 +892,9 @@ namespace Lskj.Control
|
||||
|
||||
/* ② 如果启用了多表头(CustomGroupBandEx),
|
||||
* 尝试用 BandedGridColumn.OwnerBand 获取 Band 标题 */
|
||||
var bandEx = this.ModuleGridObj.GridControlObj.CustomGroupBandEx;
|
||||
if (bandEx != null)
|
||||
if (this.ModuleGridObj.GridControlObj.CustomGroupBandEx != null)
|
||||
{
|
||||
var bandEx = this.ModuleGridObj.GridControlObj.CustomGroupBandEx;
|
||||
var bandedView = bandEx.GridView as DevExpress.XtraGrid.Views.BandedGrid.BandedGridView;
|
||||
GridColumn focusedColumn = null;
|
||||
//DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hitInfo = bandedView.CalcHitInfo(MousePosition.X, MousePosition.Y);
|
||||
@@ -914,7 +912,32 @@ namespace Lskj.Control
|
||||
columnCaption = band.Caption; // 用 Band 的标题
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (this.ModuleGridObj.GridControlObj.CustomGroupTreeBandEx != null)
|
||||
{
|
||||
var treeBandEx = this.ModuleGridObj.GridControlObj.CustomGroupTreeBandEx;
|
||||
var treeBandedView = treeBandEx.TreeListObj as DevExpress.XtraTreeList.TreeList;
|
||||
DevExpress.XtraTreeList.Columns.TreeListColumn focusedColumn = null;
|
||||
//DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hitInfo = bandedView.CalcHitInfo(MousePosition.X, MousePosition.Y);
|
||||
focusedColumn = treeBandedView.FocusedColumn;
|
||||
if (treeBandedView != null && focusedColumn != null)
|
||||
{
|
||||
// 强转;成功才说明列属于 BandedGridView
|
||||
var bcol = focusedColumn as DevExpress.XtraTreeList.Columns.TreeListColumn;
|
||||
if (bcol != null && bcol.ParentBand != null)
|
||||
{
|
||||
// 若只想最顶层 Band,循环 ParentBand 至 null
|
||||
var band = bcol.ParentBand;
|
||||
while (band.ParentBand != null) band = band.ParentBand;
|
||||
|
||||
columnCaption = band.Caption; // 用 Band 的标题
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ③ 替换占位符(Replace 会返回新字符串)
|
||||
sqlValue = sqlValue.Replace("{COLUMN_TITLE}", columnCaption);
|
||||
@@ -1330,40 +1353,4 @@ namespace Lskj.Control
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是否有未保存的数据,并保存
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool VerificationInterface()
|
||||
{
|
||||
if (SystemInfo.Instance.EfficientVerification)
|
||||
{
|
||||
//页签验证
|
||||
if (!this.TcButtom.CheckIfSaved())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//主表验证
|
||||
if (this.ModuleGridObj.GridControlObj.IsDataNotSaved())
|
||||
{
|
||||
DialogResult dialog = MessageUtil.Show("主表有数据未保存,是否保存", MessageBoxButtons.YesNo);
|
||||
if (dialog == DialogResult.Yes)
|
||||
{
|
||||
bool SaveResults = this.ModuleGridObj.SaveWhenSwitching();
|
||||
if (!SaveResults) return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user