| | |
| | | request.Timeout = 150000; |
| | | request.AllowAutoRedirect = false; |
| | | request.ServicePoint.Expect100Continue = false; |
| | | wdf.SetCaption(_caption + "(10/100)" + meth); |
| | | // wdf.SetCaption(_caption + "(10/100)" + meth); |
| | | HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); |
| | | request.CachePolicy = noCachePolicy; |
| | | wdf.SetCaption(_caption + "(20/100)" + meth); |
| | | // wdf.SetCaption(_caption + "(20/100)" + meth); |
| | | requestStream = new StreamWriter(request.GetRequestStream()); |
| | | requestStream.Write(param); |
| | | requestStream.Close(); |
| | | wdf.SetCaption(_caption + "30/100)" + meth); |
| | | // wdf.SetCaption(_caption + "30/100)" + meth); |
| | | response = request.GetResponse(); |
| | | wdf.SetCaption(_caption + "(40/100)"); |
| | | // wdf.SetCaption(_caption + "(40/100)"); |
| | | if (response != null) |
| | | { |
| | | wdf.SetCaption(_caption + "(50/100)" + meth); |
| | | // wdf.SetCaption(_caption + "(50/100)" + meth); |
| | | var reader = new StreamReader(response.GetResponseStream(), |
| | | Encoding.UTF8); |
| | | responseStr = reader.ReadToEnd(); |
| | | //File.WriteAllText(Server.MapPath("~/") + @"\test.txt", responseStr); |
| | | reader.Close(); |
| | | wdf.SetCaption(_caption + "(60/100)" + meth); |
| | | // wdf.SetCaption(_caption + "(60/100)" + meth); |
| | | } |
| | | wdf.SetCaption(_caption + "(80/100)" + meth); |
| | | // wdf.SetCaption(_caption + "(80/100)" + meth); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | requestStream = null; |
| | | response = null; |
| | | } |
| | | wdf.SetCaption(_caption + "(90/100)"); |
| | | // wdf.SetCaption(_caption + "(90/100)"); |
| | | wdf.Close(); |
| | | return responseStr; |
| | | } |
| | |
| | | { |
| | | return new FilterEntity(getQueryWord(id), idDec + ")", " like ", "包含)", "%" + val + "%"); |
| | | } |
| | | public static List<FilterEntity> GetDilter(GridColumnCollection Columns) |
| | | public static List<FilterEntity> GetDilter(GridColumnCollection Columns, GridView gridView1 = null) |
| | | { |
| | | List<FilterEntity> fiList = new List<FilterEntity>(); |
| | | if (gridView1 != null) |
| | | { |
| | | bool b = gridView1.ActiveFilterEnabled; |
| | | if (b == false) |
| | | return fiList; |
| | | } |
| | | foreach (DevExpress.XtraGrid.Columns.GridColumn col in Columns) |
| | | { |
| | | ColumnFilterInfo filter = col.FilterInfo; |
| | |
| | | public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null) |
| | | { |
| | | gridView1.OptionsView.ColumnAutoWidth = false;//自动调整列宽 |
| | | // gridView1.BestFitColumns();//数据绑定到GridView之后调用BestFitColumns()方法 |
| | | foreach (GridColumn column in gridView1.Columns) |
| | | { |
| | | column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains; |
| | | column.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | column.OptionsColumn.AllowEdit = true; |
| | | column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains; |
| | | column.OptionsFilter.AutoFilterCondition = DevExpress.XtraGrid.Columns.AutoFilterCondition.Contains; |
| | | column.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | if (column.Tag == null || column.Tag.ToString().EndsWith("edit")) |
| | | column.OptionsColumn.ReadOnly = false; |
| | | else |
| | |
| | | column.OptionsFilter.AllowAutoFilter = false; |
| | | } |
| | | gridView1.OptionsFilter.AllowAutoFilterConditionChange = DevExpress.Utils.DefaultBoolean.False; |
| | | gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | gridView1.OptionsFilter.AllowFilterEditor = false; |
| | | gridView1.OptionsFilter.ShowCustomFunctions = DevExpress.Utils.DefaultBoolean.False; |
| | | gridView1.OptionsFilter.AllowColumnMRUFilterList = false; |
| | | gridView1.OptionsFilter.AllowMRUFilterList = false; |
| | | gridView1.OptionsCustomization.AllowFilter = false; |
| | | gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | gridView1.OptionsView.ShowGroupPanel = false; |
| | | //是否显示底部的过滤条 |
| | | // gridView1.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; |
| | | gridView1.IndicatorWidth = 50; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | //if (e.RowHandle == GridControl.AutoFilterRowHandle) |
| | | //{ |
| | | // e.Info.DisplayText = "筛选行"; |
| | | //} |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | }; |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | int _handle = gridView1.FocusedRowHandle; |
| | | if (_handle == -1) |
| | | bool _bl = xtraTabControl1.TabPages[0].PageEnabled; |
| | | if (_bl == false) { return; }; |
| | | if (_handle < 0 ) |
| | | { |
| | | xtraTabControl1.SelectedTabPageIndex = -1; |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择你要显示的行!" + _handle.ToString() + "tag" + xtraTabControl1.SelectedTabPageIndex.ToString()); |
| | | return; |
| | | } |
| | | DataRow row = gridView1.GetDataRow(_handle); |
| | | if (row == null) |
| | | { |
| | | xtraTabControl1.SelectedTabPageIndex = -1; |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择你要显示的行!" + _handle.ToString()); |
| | | return; |
| | | } |
| | | string _guid = row["guid"].ToString(); |
| | | if (string.IsNullOrEmpty(_guid)) |
| | | { |
| | | xtraTabControl1.SelectedTabPageIndex = -1; |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择你要显示的行!" + _handle.ToString()); |
| | | return; |
| | | } |
| | | action(_guid); |
| | | } |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | { |
| | | page(pageBar1.CurrentPage); |
| | | // page(pageBar1.CurrentPage); |
| | | } |
| | | }; |
| | | } |