SVN r384
SVN-Revision: r384
This commit is contained in:
+1
-1
@@ -103,8 +103,8 @@ namespace Lskj.ProductiSched
|
||||
// pltopmain
|
||||
//
|
||||
this.pltopmain.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.pltopmain.Controls.Add(this.treebandGcTop);
|
||||
this.pltopmain.Controls.Add(this.bandGcTop);
|
||||
this.pltopmain.Controls.Add(this.treebandGcTop);
|
||||
this.pltopmain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pltopmain.Location = new System.Drawing.Point(0, 0);
|
||||
this.pltopmain.Name = "pltopmain";
|
||||
|
||||
@@ -762,13 +762,17 @@ namespace Lskj.ProductiSched
|
||||
{
|
||||
foreach (TreeListBand band in treeListSender.Bands)
|
||||
{
|
||||
if (band.Columns.Count == 1 && band.Columns[0].FieldName.Contains("DDay_"))
|
||||
if (band.Columns.Count == 1 && band.Columns[0].Name.Contains("DDay_"))
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
allWidth += band.Width;
|
||||
foreach (TreeListColumn treeListColumn in band.Columns)
|
||||
{
|
||||
allWidth += treeListColumn.Width;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -902,21 +906,38 @@ namespace Lskj.ProductiSched
|
||||
UpdateDynamicColumns(bandGcTop, dateTime, typeDate);
|
||||
}
|
||||
UpdateDynamicColumns(bandGcBottom, dateTime, typeDate);
|
||||
DataTable dataMain = bandGcTop.GridControl.DataSourceTable().Copy();
|
||||
DataTable dataDetail = bandGcTop.GridControl.DataSourceTable().Copy();
|
||||
bandGcTop.GridControl.DataSource = null;
|
||||
DataTable dataMain = null;
|
||||
DataTable dataDetail = null;
|
||||
if (TreeMultiHeader)
|
||||
{
|
||||
dataMain = treebandGcTop.GetGridViewDataSource().Copy();
|
||||
dataDetail = treebandGcTop.GetGridViewDataSource().Copy();
|
||||
treebandGcTop.GridControl.DataSource = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataMain = bandGcTop.GridControl.DataSourceTable().Copy();
|
||||
dataDetail = bandGcTop.GridControl.DataSourceTable().Copy();
|
||||
bandGcTop.GridControl.DataSource = null;
|
||||
}
|
||||
|
||||
string sqlValue = DataModel.RightModuleModel.MenuSql;
|
||||
string isweekcond = DataModel.TopModuleModel.HasReport ? "" : $"and isWeek='{typeDate}'";
|
||||
sqlValue = $"{ReplaceHelper.ReplaceWhereCond(sqlValue)} and day >= '{dateTime.ToString("yyyy-MM-dd")}' {isweekcond}";
|
||||
DataTable dataDayPlan = BaseImpl.GetDataTableResult(sqlValue);
|
||||
MergeMainDataWithDayPlan(dataMain, dataDayPlan, dateTime, typeDate);
|
||||
bandGcTop.BandedView.GridControl.DataSource = dataMain;
|
||||
if (bandGcBottom.Visible)
|
||||
{
|
||||
DataTable bottomTab = BuildCTable(dataDetail, dataDayPlan, dateTime, 93);
|
||||
bandGcBottom.BandedView.GridControl.DataSource = bottomTab;
|
||||
}
|
||||
OnBandedViewRowCellClick(bandGcTop.BandedView, null);
|
||||
if (!TreeMultiHeader)
|
||||
{
|
||||
MergeMainDataWithDayPlan(dataMain, dataDayPlan, dateTime, typeDate);
|
||||
bandGcTop.BandedView.GridControl.DataSource = dataMain;
|
||||
OnBandedViewRowCellClick(bandGcTop.BandedView, null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
string query = @"
|
||||
SELECT
|
||||
@@ -1358,6 +1379,7 @@ namespace Lskj.ProductiSched
|
||||
/// </summary>
|
||||
private void UpdateWeeklyColumns(TreeBandedGridControlEx grid, DateTime currentDate)
|
||||
{
|
||||
grid.TreeListObj.BeginInit();
|
||||
DateTime endDate = currentDate.AddMonths(3).AddDays(-1);
|
||||
int weekIndex = 0;
|
||||
DateTime weekStart = GetStartOfWeek(currentDate);
|
||||
@@ -1407,6 +1429,7 @@ namespace Lskj.ProductiSched
|
||||
}
|
||||
}
|
||||
}
|
||||
grid.TreeListObj.EndInit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user