| | |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.RichEdit.Export; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid; |
| | |
| | | return _sbSqlWhere.ToString(); |
| | | } |
| | | /// <summary> |
| | | /// 初始化gridview |
| | | /// |
| | | /// </summary> |
| | | /// <param name="gridView1"></param> |
| | | public static void SetGridSear(GridView gridView1) |
| | | /// <param name="gridView1">gridview</param> |
| | | /// <param name="btnChkIco">图标按钮</param> |
| | | /// <param name="fm">当前窗体</param> |
| | | /// <param name="fileName">字段</param> |
| | | /// <param name="icoName">图标路径</param> |
| | | public static void SetGridSear(GridView gridView1, PictureBox btnChkIco = null, Form fm = null, string fileName = "checkStatus", string icoName = "") |
| | | { |
| | | foreach (GridColumn column in gridView1.Columns) |
| | | { |
| | | column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains; |
| | | column.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | column.OptionsColumn.AllowEdit = false; |
| | | // column.OptionsColumn.AllowEdit = false; |
| | | if (column.Tag == null || column.Tag.ToString().Length <= 0) |
| | | column.OptionsFilter.AllowAutoFilter = false; |
| | | } |
| | |
| | | e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | |
| | | if (btnChkIco != null) |
| | | { |
| | | gridView1.FocusedRowChanged += (s, e) => |
| | | { |
| | | UtilityHelper.SetCheckIco(s, btnChkIco, fm, fileName, icoName); |
| | | }; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | public static bool IsNumeric(string str) |
| | | { |