| | |
| | | </assemblyBinding> |
| | | </runtime> |
| | | <appSettings> |
| | | <!--<add key="WebApiUrl" value="http://localhost:5263/" />--> |
| | | <add key="WebApiUrl" value="http://192.168.1.145:81/" /> |
| | | <add key="WebApiUrl" value="http://localhost:5263/" /> |
| | | <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />--> |
| | | <add key="LogPath" value="logs" /> |
| | | <add key="ProductName" value="广深科技 G-MES V2.0" /> |
| | | <add key="PageSize" value="50" /> |
| | |
| | | this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); |
| | | this.gcMain = new DevExpress.XtraGrid.GridControl(); |
| | | this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | | this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_depotCode = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_depotName = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_depottype = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_createBy = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_isNg = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | |
| | | this.gridView1.Appearance.Row.Options.UseFont = true; |
| | | this.gridView1.ColumnPanelRowHeight = 60; |
| | | this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { |
| | | this.gridColumn3, |
| | | this.gv_depotCode, |
| | | this.gv_depotName, |
| | | this.gv_depottype, |
| | | this.gv_createBy, |
| | | this.gv_isNg, |
| | | this.gridColumn2, |
| | | this.gridColumn1}); |
| | |
| | | this.gridView1.IndicatorWidth = 50; |
| | | this.gridView1.Name = "gridView1"; |
| | | this.gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | this.gridView1.OptionsSelection.MultiSelect = true; |
| | | this.gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; |
| | | this.gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | this.gridView1.OptionsView.ShowGroupPanel = false; |
| | | this.gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | // |
| | | // gridColumn3 |
| | | // |
| | | this.gridColumn3.Caption = "."; |
| | | this.gridColumn3.FieldName = "chkInt"; |
| | | this.gridColumn3.MinWidth = 25; |
| | | this.gridColumn3.Name = "gridColumn3"; |
| | | this.gridColumn3.Visible = true; |
| | | this.gridColumn3.VisibleIndex = 0; |
| | | this.gridColumn3.Width = 94; |
| | | // |
| | | // gv_depotCode |
| | | // |
| | |
| | | this.gv_depottype.VisibleIndex = 3; |
| | | this.gv_depottype.Width = 80; |
| | | // |
| | | // gv_createBy |
| | | // |
| | | this.gv_createBy.AppearanceCell.Options.UseFont = true; |
| | | this.gv_createBy.Caption = "仓库负责人"; |
| | | this.gv_createBy.FieldName = "createBy"; |
| | | this.gv_createBy.MinWidth = 50; |
| | | this.gv_createBy.Name = "gv_createBy"; |
| | | this.gv_createBy.OptionsColumn.AllowEdit = false; |
| | | this.gv_createBy.Tag = "query_a.create_by"; |
| | | this.gv_createBy.Visible = true; |
| | | this.gv_createBy.VisibleIndex = 4; |
| | | this.gv_createBy.Width = 71; |
| | | // |
| | | // gv_isNg |
| | | // |
| | | this.gv_isNg.AppearanceCell.Options.UseFont = true; |
| | |
| | | // gridColumn1 |
| | | // |
| | | this.gridColumn1.Caption = "使用组织"; |
| | | this.gridColumn1.FieldName = "fSubsidiary"; |
| | | this.gridColumn1.FieldName = "fSubsidiary2"; |
| | | this.gridColumn1.MinWidth = 50; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn1.Tag = "org.FNumber"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 7; |
| | | this.gridColumn1.VisibleIndex = 6; |
| | | this.gridColumn1.Width = 250; |
| | | // |
| | | // panelControl1 |
| | |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_depotCode; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_depotName; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_depottype; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_createBy; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_isNg; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; |
| | | } |
| | | } |
| | |
| | | public SelectCk(string _userGuid) |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; |
| | | this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); }; |
| | | this.userGuid = _userGuid; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); |
| | | getPageList(1); |
| | | btnIn.Click += (s, e) => |
| | | { |
| | | gridView1.PostEditor(); |
| | | gridView1.UpdateCurrentRow(); |
| | | System.Text.StringBuilder sbList = new System.Text.StringBuilder(); |
| | | int[] rows = this.gridView1.GetSelectedRows();//先获取选择行的行号 |
| | | DataTable dt = this.gcMain.DataSource as DataTable;//得到GridControl的数据源 |
| | | foreach (int idx in rows) |
| | | DataTable dt = this.gcMain.DataSource as DataTable; |
| | | { |
| | | string _guid = dt.Rows[idx]["guid"].ToString(); |
| | | if (sbList.Length > 0) |
| | | sbList.Append(","); |
| | | sbList.Append(_guid); |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | string checkBox = dr["chkInt"].ToString(); |
| | | string _guid = dr["guid"].ToString(); |
| | | if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox)) |
| | | { |
| | | if (sbList.Length > 0) |
| | | sbList.Append(","); |
| | | sbList.Append(_guid); |
| | | } |
| | | } |
| | | } |
| | | var _obj = new |
| | | { |
| | |
| | | bindGuidslist = sbList.ToString(), |
| | | fType = "仓库", |
| | | }; |
| | | |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = ""; |
| | | var pgq = new PageQueryModel(curPage, 999999, "org.FNumber asc ,a.depot_code", "asc", |
| | | "", _sbSqlWhere.ToString()); |
| | | var pgq = new PageQueryModel(curPage, 999999, "org.FNumber asc ,a.depot_code", "asc", "", _sbSqlWhere.ToString(), userGuid); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | _webServiceName + "GetListPage", json); |
| | | _webServiceName + "GetListPage2", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | |
| | | using DevExpress.XtraGrid.Columns; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | |
| | | using System.Windows.Forms; |
| | | using System.Windows.Forms.VisualStyles; |
| | | |
| | | |
| | | namespace Gs.DevApp.DevFrm.PDA |
| | | { |
| | |
| | | public SelectPage(string _userGuid) |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.CustomDrawColumnHeader += (s, e) => { gridViewLeftList_CustomDrawColumnHeader(s, e); }; |
| | | this.gridView1.MouseUp += (s, e) => { gridViewLeftList_MouseUp(s, e); }; |
| | | this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; |
| | | this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); }; |
| | | this.userGuid = _userGuid; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); |
| | | getPageList(1); |
| | | btnIn.Click += (s, e) => |
| | | { |
| | | gridView1.PostEditor(); |
| | | gridView1.UpdateCurrentRow(); |
| | | System.Text.StringBuilder sbList = new System.Text.StringBuilder(); |
| | | DataTable dt = this.gcMain.DataSource as DataTable; |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | #region 绘制表头全选勾选框 |
| | | /// <summary> |
| | | /// 绘制表头全选勾选框 |
| | | /// </summary> |
| | | private Rectangle checkBoxColumnHeaderRect = Rectangle.Empty; |
| | | private GridColumn checkBoxColumn = null; |
| | | private void gridViewLeftList_CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e) |
| | | { |
| | | if (e.Column != null && e.Column.AbsoluteIndex == 0) |
| | | { |
| | | e.Column.Caption = ""; |
| | | checkBoxColumnHeaderRect = e.Bounds; |
| | | checkBoxColumn = e.Column; |
| | | //须把列头标题设置为空 |
| | | e.Painter.DrawObject(e.Info); |
| | | //在列头中心显示复选框 |
| | | int x = e.Bounds.X + (int)((e.Bounds.Width - CheckBoxRenderer.GetGlyphSize(e.Graphics, CheckBoxState.UncheckedNormal).Width) * 0.5); |
| | | int y = e.Bounds.Y + (int)((e.Bounds.Height - CheckBoxRenderer.GetGlyphSize(e.Graphics, CheckBoxState.UncheckedNormal).Height) * 0.5); |
| | | Point location = new Point(x, y); |
| | | CheckBoxState checkBoxState; |
| | | if (e.Column.Tag != null && e.Column.Tag.ToString() == "1") |
| | | checkBoxState = CheckBoxState.CheckedPressed; |
| | | else |
| | | checkBoxState = CheckBoxState.UncheckedNormal; |
| | | CheckBoxRenderer.DrawCheckBox(e.Graphics, location, checkBoxState); |
| | | e.Handled = true; |
| | | } |
| | | } |
| | | |
| | | private void gridViewLeftList_MouseUp(object sender, MouseEventArgs e) |
| | | { |
| | | if (checkBoxColumnHeaderRect != Rectangle.Empty) |
| | | { |
| | | if (e.X > checkBoxColumnHeaderRect.X && e.X < (checkBoxColumnHeaderRect.X + checkBoxColumnHeaderRect.Width) && e.Y > checkBoxColumnHeaderRect.Y && e.Y < (checkBoxColumnHeaderRect.Y + checkBoxColumnHeaderRect.Height)) |
| | | { |
| | | DataTable _Table = (DataTable)gcMain.DataSource; |
| | | if (checkBoxColumn.Tag != null && checkBoxColumn.Tag.ToString() == "1") |
| | | { |
| | | checkBoxColumn.Tag = "0"; |
| | | foreach (DataRow row in _Table.Rows) |
| | | { |
| | | row["chkInt"] = false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | checkBoxColumn.Tag = "1"; |
| | | foreach (DataRow row in _Table.Rows) |
| | | { |
| | | row["chkInt"] = true; |
| | | } |
| | | } |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = _Table; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.CloseEditor(); |
| | | gridView1.PostEditor(); |
| | | gridView1.UpdateCurrentRow(); |
| | | gridView1.InvalidateColumnHeader(checkBoxColumn); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | this.panelControl2 = new DevExpress.XtraEditors.PanelControl(); |
| | | this.gcMain = new DevExpress.XtraGrid.GridControl(); |
| | | this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | | this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_depotCode = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_depottype = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_createBy = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | |
| | | this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.panelControl2.Location = new System.Drawing.Point(0, 0); |
| | | this.panelControl2.Name = "panelControl2"; |
| | | this.panelControl2.Size = new System.Drawing.Size(645, 691); |
| | | this.panelControl2.Size = new System.Drawing.Size(595, 691); |
| | | this.panelControl2.TabIndex = 4; |
| | | // |
| | | // gcMain |
| | |
| | | this.gcMain.Location = new System.Drawing.Point(2, 2); |
| | | this.gcMain.MainView = this.gridView1; |
| | | this.gcMain.Name = "gcMain"; |
| | | this.gcMain.Size = new System.Drawing.Size(641, 644); |
| | | this.gcMain.Size = new System.Drawing.Size(591, 644); |
| | | this.gcMain.TabIndex = 6; |
| | | this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { |
| | | this.gridView1}); |
| | |
| | | this.gridView1.Appearance.Row.Options.UseFont = true; |
| | | this.gridView1.ColumnPanelRowHeight = 60; |
| | | this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { |
| | | this.gridColumn1, |
| | | this.gv_depotCode, |
| | | this.gv_depottype, |
| | | this.gv_createBy, |
| | |
| | | this.gridView1.IndicatorWidth = 50; |
| | | this.gridView1.Name = "gridView1"; |
| | | this.gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | this.gridView1.OptionsSelection.MultiSelect = true; |
| | | this.gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; |
| | | this.gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | this.gridView1.OptionsView.ShowGroupPanel = false; |
| | | // |
| | | // gridColumn1 |
| | | // |
| | | this.gridColumn1.Caption = "."; |
| | | this.gridColumn1.FieldName = "chkInt"; |
| | | this.gridColumn1.MinWidth = 25; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 0; |
| | | this.gridColumn1.Width = 94; |
| | | // |
| | | // gv_depotCode |
| | | // |
| | |
| | | this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom; |
| | | this.panelControl1.Location = new System.Drawing.Point(2, 646); |
| | | this.panelControl1.Name = "panelControl1"; |
| | | this.panelControl1.Size = new System.Drawing.Size(641, 43); |
| | | this.panelControl1.Size = new System.Drawing.Size(591, 43); |
| | | this.panelControl1.TabIndex = 5; |
| | | // |
| | | // btnIn |
| | |
| | | this.btnIn.AppearancePressed.Options.UseBackColor = true; |
| | | this.btnIn.Dock = System.Windows.Forms.DockStyle.Right; |
| | | this.btnIn.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.selectvaluespivottable_16x16; |
| | | this.btnIn.Location = new System.Drawing.Point(545, 2); |
| | | this.btnIn.Location = new System.Drawing.Point(495, 2); |
| | | this.btnIn.Name = "btnIn"; |
| | | this.btnIn.Size = new System.Drawing.Size(94, 39); |
| | | this.btnIn.TabIndex = 4; |
| | |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.ClientSize = new System.Drawing.Size(645, 691); |
| | | this.ClientSize = new System.Drawing.Size(595, 691); |
| | | this.Controls.Add(this.panelControl2); |
| | | this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; |
| | | this.MaximizeBox = false; |
| | |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_depottype; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_createBy; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_isNg; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; |
| | | } |
| | | } |
| | |
| | | public SelectPrint(string _userGuid) |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; |
| | | this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); }; |
| | | this.userGuid = _userGuid; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); |
| | | getPageList(1); |
| | | btnIn.Click += (s, e) => |
| | | { |
| | | gridView1.PostEditor(); |
| | | gridView1.UpdateCurrentRow(); |
| | | System.Text.StringBuilder sbList = new System.Text.StringBuilder(); |
| | | int[] rows = this.gridView1.GetSelectedRows();//先获取选择行的行号 |
| | | DataTable dt = this.gcMain.DataSource as DataTable;//得到GridControl的数据源 |
| | | foreach (int idx in rows) |
| | | DataTable dt = this.gcMain.DataSource as DataTable; |
| | | { |
| | | string _guid = dt.Rows[idx]["guid"].ToString(); |
| | | if (sbList.Length > 0) |
| | | sbList.Append(","); |
| | | sbList.Append(_guid); |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | string checkBox = dr["chkInt"].ToString(); |
| | | string _guid = dr["guid"].ToString(); |
| | | if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox)) |
| | | { |
| | | if (sbList.Length > 0) |
| | | sbList.Append(","); |
| | | sbList.Append(_guid); |
| | | } |
| | | } |
| | | } |
| | | var _obj = new |
| | | { |
| | |
| | | private void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = ""; |
| | | var pgq = new PageQueryModel(curPage, 999999, "a.print_no", "asc", |
| | | "", _sbSqlWhere.ToString()); |
| | | var pgq = new PageQueryModel(curPage, 999999, "a.print_no", "asc", "", _sbSqlWhere.ToString(), userGuid); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); |
| | | var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage2", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using System.Windows.Forms.VisualStyles; |
| | | using UserControls.Data; |
| | | using static System.Windows.Forms.Control; |
| | | |
| | |
| | | } |
| | | }; |
| | | gridView1.OptionsView.ColumnAutoWidth = false;//自动调整列宽 |
| | | |
| | | |
| | | if (isPostSearch == true) |
| | | { |
| | | gridView1.OptionsView.ShowGroupPanel = false; |
| | |
| | | return 0; |
| | | return decimal.Parse(txt); |
| | | } |
| | | |
| | | |
| | | |
| | | #region 绘制表头全选勾选框 |
| | | /// <summary> |
| | | /// 绘制表头全选勾选框 |
| | | /// </summary> |
| | | // private Rectangle checkBoxColumnHeaderRect = Rectangle.Empty; |
| | | // private GridColumn checkBoxColumn = null; |
| | | public static void CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e) |
| | | { |
| | | Rectangle checkBoxColumnHeaderRect = new Rectangle(51, 1, 37, 57); |
| | | if (e.Column != null && e.Column.AbsoluteIndex == 0) |
| | | { |
| | | //X = 51 Y = 1 Width = 37 Height = 57 |
| | | e.Column.Caption = "."; |
| | | checkBoxColumnHeaderRect = e.Bounds; |
| | | // checkBoxColumn = e.Column; |
| | | //须把列头标题设置为空 |
| | | e.Painter.DrawObject(e.Info); |
| | | //在列头中心显示复选框 |
| | | int x = e.Bounds.X + (int)((e.Bounds.Width - CheckBoxRenderer.GetGlyphSize(e.Graphics, CheckBoxState.UncheckedNormal).Width) * 0.5); |
| | | int y = e.Bounds.Y + (int)((e.Bounds.Height - CheckBoxRenderer.GetGlyphSize(e.Graphics, CheckBoxState.UncheckedNormal).Height) * 0.5); |
| | | Point location = new Point(x, y); |
| | | CheckBoxState checkBoxState; |
| | | if (e.Column.Tag != null && e.Column.Tag.ToString() == "1") |
| | | checkBoxState = CheckBoxState.CheckedPressed; |
| | | else |
| | | checkBoxState = CheckBoxState.UncheckedNormal; |
| | | CheckBoxRenderer.DrawCheckBox(e.Graphics, location, checkBoxState); |
| | | e.Handled = true; |
| | | } |
| | | } |
| | | |
| | | public static void CustomMouseUp(object sender, MouseEventArgs e, DevExpress.XtraGrid.GridControl gcMain, DevExpress.XtraGrid.Views.Grid.GridView gridView1) |
| | | { |
| | | GridColumn checkBoxColumn = gridView1.Columns[0]; |
| | | Rectangle checkBoxColumnHeaderRect = new Rectangle(51, 1, 37, 57); |
| | | if (checkBoxColumnHeaderRect != Rectangle.Empty) |
| | | { |
| | | if (e.X > checkBoxColumnHeaderRect.X && e.X < (checkBoxColumnHeaderRect.X + checkBoxColumnHeaderRect.Width) && e.Y > checkBoxColumnHeaderRect.Y && e.Y < (checkBoxColumnHeaderRect.Y + checkBoxColumnHeaderRect.Height)) |
| | | { |
| | | DataTable _Table = (DataTable)gcMain.DataSource; |
| | | if (checkBoxColumn.Tag != null && checkBoxColumn.Tag.ToString() == "1") |
| | | { |
| | | checkBoxColumn.Tag = "0"; |
| | | foreach (DataRow row in _Table.Rows) |
| | | { |
| | | row["chkInt"] = false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | checkBoxColumn.Tag = "1"; |
| | | foreach (DataRow row in _Table.Rows) |
| | | { |
| | | row["chkInt"] = true; |
| | | } |
| | | } |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = _Table; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.CloseEditor(); |
| | | gridView1.PostEditor(); |
| | | gridView1.UpdateCurrentRow(); |
| | | gridView1.InvalidateColumnHeader(checkBoxColumn); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | | /// <summary> |