| | |
| | | request.ContentType = "application/json"; |
| | | request.Headers.Add("token", GetBasicAuthTicket()); |
| | | request.Accept = "*/*"; |
| | | request.Timeout = 150000; |
| | | // request.Timeout = 150000; |
| | | request.AllowAutoRedirect = false; |
| | | request.ServicePoint.Expect100Continue = false; |
| | | HttpRequestCachePolicy noCachePolicy = new HttpRequestCachePolicy(HttpRequestCacheLevel.NoCacheNoStore); |
| | |
| | | { |
| | | gv.ClearSorting(); |
| | | gv.OptionsCustomization.AllowSort = isEdt; |
| | | |
| | | gv.OptionsFilter.AllowFilterEditor = isEdt; |
| | | gv.OptionsCustomization.AllowFilter = isEdt; |
| | | gv.OptionsView.ShowAutoFilterRow = isEdt; |
| | | |
| | | |
| | | foreach (GridColumn colmn in gv.Columns) |
| | | { |
| | | colmn.OptionsColumn.AllowEdit = true; |
| | |
| | | colmn.OptionsColumn.ReadOnly = false; |
| | | } |
| | | ; |
| | | if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui")) |
| | | if (colmn.Name.ToString().Contains("gvMxDel") |
| | | || colmn.Name.ToString().Contains("gvMxTui")) |
| | | { |
| | | colmn.Visible = !isEdt; |
| | | if (colmn.Visible == true) |
| | |
| | | if (_btnAry2.Length > 0) |
| | | { |
| | | var _btnType = _btnAry2[0]; |
| | | _btnType.Enabled = !isEdt; |
| | | } |
| | | var _btnAry3 = controls.Find("btnCopyXls", false); |
| | | if (_btnAry3.Length > 0) |
| | | { |
| | | var _btnType = _btnAry3[0]; |
| | | _btnType.Enabled = !isEdt; |
| | | } |
| | | var _btnAry4 = controls.Find("btnDown", false); |
| | | if (_btnAry4.Length > 0) |
| | | { |
| | | var _btnType = _btnAry4[0]; |
| | | _btnType.Enabled = !isEdt; |
| | | } |
| | | foreach (JProperty property in dynamicObject.Properties()) |
| | |
| | | txt.IsReadly = isEdt; |
| | | continue; |
| | | } |
| | | //自定组织all |
| | | if (colType is UcLookOrgAll) |
| | | { |
| | | var txt = colType as UcLookOrgAll; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.IsReadly = isEdt; |
| | | continue; |
| | | } |
| | | //自定用户 |
| | | if (colType is UcLookUser) |
| | | { |
| | |
| | | { |
| | | gv.ClearSorting(); |
| | | gv.OptionsCustomization.AllowSort = isEdt; |
| | | gv.OptionsFilter.AllowFilterEditor = isEdt; |
| | | gv.OptionsCustomization.AllowFilter = isEdt; |
| | | gv.OptionsView.ShowAutoFilterRow = isEdt; |
| | | foreach (GridColumn colmn in gv.Columns) |
| | | { |
| | | colmn.OptionsColumn.AllowEdit = true; |
| | |
| | | txt.IsReadly = isEdt; |
| | | continue; |
| | | } |
| | | //自定组织All |
| | | if (ctrl is UcLookOrgAll) |
| | | { |
| | | var txt = ctrl as UcLookOrgAll; |
| | | txt.SetIdOrCode("-1"); |
| | | txt.IsReadly = isEdt; |
| | | continue; |
| | | } |
| | | //自定用户 |
| | | if (ctrl is UcLookUser) |
| | | { |
| | |
| | | { |
| | | gv.ClearSorting(); |
| | | gv.OptionsCustomization.AllowSort = isEdt; |
| | | |
| | | gv.OptionsFilter.AllowFilterEditor = isEdt; |
| | | gv.OptionsCustomization.AllowFilter = isEdt; |
| | | gv.OptionsView.ShowAutoFilterRow = isEdt; |
| | | |
| | | |
| | | foreach (GridColumn colmn in gv.Columns) |
| | | { |
| | | colmn.OptionsColumn.AllowEdit = true; |
| | |
| | | if (ctrl is UcLookOrg) |
| | | { |
| | | var txt = ctrl as UcLookOrg; |
| | | txt.IsReadly = isEdt; |
| | | continue; |
| | | } |
| | | //自定组织 |
| | | if (ctrl is UcLookOrgAll) |
| | | { |
| | | var txt = ctrl as UcLookOrgAll; |
| | | txt.IsReadly = isEdt; |
| | | continue; |
| | | } |
| | |
| | | // 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")) |
| | | if (column.Tag == null || column.Tag.ToString().EndsWith("edit") || column.Name== "colChkInt") |
| | | { |
| | | column.OptionsColumn.ReadOnly = false; |
| | | } |
| | | else |
| | | column.OptionsColumn.ReadOnly = true; |
| | | |
| | |
| | | column.MaxWidth = 0; |
| | | } |
| | | gridView1.OptionsView.ColumnAutoWidth = false;//自动调整列宽 |
| | | gridView1.OptionsFilter.AllowFilterEditor = false; |
| | | gridView1.OptionsFilter.AllowFilterEditor = true; |
| | | gridView1.OptionsFilter.ShowCustomFunctions = DevExpress.Utils.DefaultBoolean.False; |
| | | gridView1.OptionsCustomization.AllowFilter = false; |
| | | gridView1.OptionsCustomization.AllowFilter = true; |
| | | gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | gridView1.OptionsView.ShowAutoFilterRow = false; |
| | | gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | gridView1.OptionsView.ShowGroupPanel = false; |
| | | gridView1.IndicatorWidth = 60; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | return ""; |
| | | } |
| | | } |
| | | public static string GetFirstOrg(UserControl.UcLookOrgAll txt_erpSczz) |
| | | { |
| | | string userGuid = LoginInfoModel.CurrentUser.LoginUserGuid; |
| | | var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, " and IS_STATUS=1"); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); |
| | | var _obj = UtilityHelper.ReturnToDynamic(strReturn); |
| | | string _extendText = _obj.rtnData.extendText; |
| | | string[] _dftOrg = _extendText.Split(','); |
| | | if (_dftOrg.Length > 0) |
| | | { |
| | | txt_erpSczz.SetIdOrCode(_dftOrg[0].Trim()); |
| | | return _dftOrg[0].Trim(); |
| | | } |
| | | return ""; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |