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