SVN-Revision: r407
This commit is contained in:
wyf
2025-03-27 02:25:45 +00:00
parent f88a8493d4
commit 1b924a38dd
2 changed files with 52 additions and 3 deletions
+50 -2
View File
@@ -271,6 +271,7 @@ namespace Lskj.ProductiSched
splitLeftControl.SplitterPositionChanged += OnBandedViewColumnWidthChanged;
splitMainControl.SplitterPositionChanged += OnSplitContainerPositionChanged;
DataModel.TopSearchObj.OnDataSourceBindCallBack += OnDataSourceBindCallBack;
DataModel.TopSearchObj.OnSearchBeforeCallBack += OnSearchBeforeCallBack; ;
DataModel.TopSearchObj.OnSearchAfterCallBack += OnSearchAfterCallBack;
if (bandGcBottom != null)
{
@@ -1042,7 +1043,6 @@ namespace Lskj.ProductiSched
{
if (TreeMultiHeader)
{
treebandGcTop.TreeListObj.LeftCoord = bandGcBottom.BandedView.LeftCoord;
}
else
@@ -1107,6 +1107,22 @@ namespace Lskj.ProductiSched
}
}
/// <summary>
/// 搜索前事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnSearchBeforeCallBack(object sender, SearchArgs e)
{
if (TreeMultiHeader)
{
DataModel.MainLeftCoord = treebandGcTop.TreeListObj.LeftCoord;
}
else
{
DataModel.MainLeftCoord = bandGcTop.BandedView.LeftCoord;
}
}
/// <summary>
/// 搜索后事件
/// </summary>
/// <param name="sender"></param>
@@ -1170,10 +1186,12 @@ namespace Lskj.ProductiSched
{
bandGcTop.BandedView.GridControl.DataSource = dataMain;
OnBandedViewRowCellClick(bandGcTop.BandedView, null);
bandGcTop.BandedView.LeftCoord = DataModel.MainLeftCoord;
}
else
{
treebandGcTop.SetGridViewDataSource(dataMain);
treebandGcTop.TreeListObj.LeftCoord = DataModel.MainLeftCoord;
}
}
string query = @"
@@ -2361,4 +2379,34 @@ namespace Lskj.ProductiSched
// 对每个动态日期列,从 dtPlan 中查找 billdocument_id 在 keyValues 内,
// 且 ShowDay 等于当前列名的记录,将 amount 累加后再乘以系数
foreach (stri
foreach (string dateCol in dateColumns)
{
decimal sumAmount = planRows
.Where(pr => keyValues.Contains(pr.BillId) && pr.ShowDay == dateCol)
.Sum(pr => pr.Amount);
// 乘以系数得到实际值
newRow[dateCol] = sumAmount * coefficient;
}
dtC.Rows.Add(newRow);
}
return dtC;
}
catch (Exception)
{
return default;
}
}
/// <summary>
/// 纠正输入异常
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnInvalidValueException(object sender, InvalidValueExceptionEventArgs e)
{
if (e.Value.Equals(""))
{
e.ExceptionMode = ExceptionMode.Ignore;
}
}
}
}
@@ -15,4 +15,5 @@ namespace Lskj.ProductiSched
//treeList树展开的节点块
public List<TreeListNode> treeListNodes = new List<TreeListNode>();
// 在你的类内部定义此字典(一次定义,长期复用)
public Dictionary<object, DateTime> columnDateMapping = new Dictionar
public Dictionary<object, DateTime> columnDateMapping = new Dictionary<object, DateTime>();
pub