📄 bxsw.cs
字号:
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.WUYUE.SummaryItem.DisplayFormat = "最小值";
this.WUYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.WUYUE.Visible = true;
//
// LIUYUE
//
this.LIUYUE.Caption = "六月";
this.LIUYUE.FieldName = "LIUYUE";
this.LIUYUE.Name = "LIUYUE";
this.LIUYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.LIUYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.LIUYUE.Visible = true;
//
// QIYUE
//
this.QIYUE.Caption = "七月";
this.QIYUE.FieldName = "QIYUE";
this.QIYUE.Name = "QIYUE";
this.QIYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.QIYUE.SummaryItem.DisplayFormat = "日 期";
this.QIYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.QIYUE.Visible = true;
//
// BAYUE
//
this.BAYUE.Caption = "八月";
this.BAYUE.FieldName = "BAYUE";
this.BAYUE.Name = "BAYUE";
this.BAYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.BAYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.BAYUE.Visible = true;
//
// JIUYUE
//
this.JIUYUE.Caption = "九月";
this.JIUYUE.FieldName = "JIUYUE";
this.JIUYUE.Name = "JIUYUE";
this.JIUYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.JIUYUE.SummaryItem.DisplayFormat = "平 均";
this.JIUYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.JIUYUE.Visible = true;
//
// SHIYUE
//
this.SHIYUE.Caption = "十月";
this.SHIYUE.FieldName = "SHIYUE";
this.SHIYUE.Name = "SHIYUE";
this.SHIYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.SHIYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.SHIYUE.Visible = true;
//
// SHYIYUE
//
this.SHYIYUE.Caption = "十一月";
this.SHYIYUE.FieldName = "SHYIYUE";
this.SHYIYUE.Name = "SHYIYUE";
this.SHYIYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.SHYIYUE.SummaryItem.DisplayFormat = "变 幅";
this.SHYIYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.SHYIYUE.Visible = true;
//
// SHERYUE
//
this.SHERYUE.Caption = "十二月";
this.SHERYUE.FieldName = "SHERYUE";
this.SHERYUE.Name = "SHERYUE";
this.SHERYUE.Options = ((DevExpress.XtraGrid.Columns.ColumnOptions)(((((((((DevExpress.XtraGrid.Columns.ColumnOptions.CanFiltered | DevExpress.XtraGrid.Columns.ColumnOptions.CanMoved)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanGrouped)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanResized)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanSorted)
| DevExpress.XtraGrid.Columns.ColumnOptions.ReadOnly)
| DevExpress.XtraGrid.Columns.ColumnOptions.CanFocused)
| DevExpress.XtraGrid.Columns.ColumnOptions.ShowInCustomizationForm)
| DevExpress.XtraGrid.Columns.ColumnOptions.NonEditable)));
this.SHERYUE.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Custom;
this.SHERYUE.Visible = true;
//
// gridBand2
//
this.gridBand2.Caption = "日/月";
this.gridBand2.Columns.Add(this.RI);
this.gridBand2.HeaderStyleName = "Style1";
this.gridBand2.Name = "gridBand2";
this.gridBand2.RowCount = 2;
this.gridBand2.Width = 75;
//
// gridBand3
//
this.gridBand3.Caption = "一月";
this.gridBand3.Columns.Add(this.YIYUE);
this.gridBand3.HeaderStyleName = "Style1";
this.gridBand3.Name = "gridBand3";
this.gridBand3.Width = 75;
//
// gridBand4
//
this.gridBand4.Caption = "二月";
this.gridBand4.Columns.Add(this.ERYUE);
this.gridBand4.HeaderStyleName = "Style1";
this.gridBand4.Name = "gridBand4";
this.gridBand4.Width = 75;
//
// gridBand5
//
this.gridBand5.Caption = "三月";
this.gridBand5.Columns.Add(this.SANYUE);
this.gridBand5.HeaderStyleName = "Style1";
this.gridBand5.Name = "gridBand5";
this.gridBand5.Width = 75;
//
// gridBand6
//
this.gridBand6.Caption = "四月";
this.gridBand6.Columns.Add(this.SIYUE);
this.gridBand6.HeaderStyleName = "Style1";
this.gridBand6.Name = "gridBand6";
this.gridBand6.Width = 75;
//
// gridBand7
//
this.gridBand7.Caption = "五月";
this.gridBand7.Columns.Add(this.WUYUE);
this.gridBand7.HeaderStyleName = "Style1";
this.gridBand7.Name = "gridBand7";
this.gridBand7.Width = 75;
//
// gridBand8
//
this.gridBand8.Caption = "六月";
this.gridBand8.Columns.Add(this.LIUYUE);
this.gridBand8.HeaderStyleName = "Style1";
this.gridBand8.Name = "gridBand8";
this.gridBand8.Width = 75;
//
// gridBand9
//
this.gridBand9.Caption = "七月";
this.gridBand9.Columns.Add(this.QIYUE);
this.gridBand9.HeaderStyleName = "Style1";
this.gridBand9.Name = "gridBand9";
this.gridBand9.Width = 75;
//
// gridBand10
//
this.gridBand10.Caption = "八月";
this.gridBand10.Columns.Add(this.BAYUE);
this.gridBand10.HeaderStyleName = "Style1";
this.gridBand10.Name = "gridBand10";
this.gridBand10.Width = 75;
//
// gridBand11
//
this.gridBand11.Caption = "九月";
this.gridBand11.Columns.Add(this.JIUYUE);
this.gridBand11.HeaderStyleName = "Style1";
this.gridBand11.Name = "gridBand11";
this.gridBand11.Width = 75;
//
// gridBand12
//
this.gridBand12.Caption = "十月";
this.gridBand12.Columns.Add(this.SHIYUE);
this.gridBand12.HeaderStyleName = "Style1";
this.gridBand12.Name = "gridBand12";
this.gridBand12.Width = 75;
//
// gridBand13
//
this.gridBand13.Caption = "十一月";
this.gridBand13.Columns.Add(this.SHYIYUE);
this.gridBand13.HeaderStyleName = "Style1";
this.gridBand13.Name = "gridBand13";
this.gridBand13.Width = 75;
//
// gridBand14
//
this.gridBand14.Caption = "十二月";
this.gridBand14.Columns.Add(this.SHERYUE);
this.gridBand14.HeaderStyleName = "Style1";
this.gridBand14.Name = "gridBand14";
this.gridBand14.Width = 75;
//
// BXSW
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(936, 557);
this.Name = "BXSW";
this.Text = "坝下水位统计表";
this.Load += new System.EventHandler(this.BXSW_Load);
((System.ComponentModel.ISupportInitialize)(this.barManager1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.barAndDockingController1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.navBarControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bandedGridView1)).EndInit();
} #endregion
void init()
{
Menu_Set MenuSet = new Menu_Set();
MenuSet.FormCurrent=this;
MenuSet.Grid=this.gridControl1;
MenuSet.mLeftStrDateCol="GCRQ";
MenuSet.mLeftStrTable1="SWQWYL_LR";
MenuSet.LabelTitle= this.label_title;
MenuSet.strLableTile = "坝下水位统计表";
MenuSet.BayueBGridColumn = this.BAYUE;
MenuSet.EryueBGridColumn = this.ERYUE;
MenuSet.LiuyueBGridColumn = this.LIUYUE;
MenuSet.SiyueBGridColumn = this.SIYUE;
MenuSet.ShiyueBGridColumn = this.SHIYUE;
MenuSet.ShieryueBGridColumn = this.SHERYUE;
MenuSet.CloName = "BXSW";
//初始化左边菜单
MenuSet.Menu_NavBarTjcxLeft(navBarControl1);
}
private void BXSW_Load(object sender, System.EventArgs e)
{ init(); }
private void barLargeButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
//把grid转变成表,传给公共变量
DataTable dt;
dt =(DataTable)this.gridControl1.DataSource;
//显示报表
XtraReport report = new StatQuery.BXSWReport(dt,this.ERYUE.SummaryText,this.SIYUE.SummaryText,this.LIUYUE.SummaryText,this.BAYUE.SummaryText,this.SHIYUE.SummaryText,this.SHERYUE.SummaryText,this.label_title.Text.Trim());
report.ShowPreview();
}
}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -