| | |
| | | /// <summary> |
| | | /// http请求 |
| | | /// </summary> |
| | | /// <param name="url"></param> |
| | | /// <param name="meth"></param> |
| | | /// <param name="param"></param> |
| | | /// <param name="isLoading"></param> |
| | | /// <param name="url">api根地址</param> |
| | | /// <param name="meth">方法名称</param> |
| | | /// <param name="param">json参数</param> |
| | | /// <param name="isLoading">是否loading</param> |
| | | /// <returns></returns> |
| | | public static string HttpPost(string url, string meth, string param, bool isLoading = true) |
| | | { |
| | | Size _size; string _caption; Color _color; Padding _pad; |
| | | (_size, _caption, _color, _pad) = getLoading(); |
| | | DevExpress.Utils.WaitDialogForm wdf = new DevExpress.Utils.WaitDialogForm("加载进度:" + meth, _caption, _size); |
| | | wdf.BackColor = _color; |
| | | wdf.Padding = _pad; |
| | | wdf.SetCaption("加载进度:" + meth); |
| | | wdf.Visible = isLoading; |
| | | DevExpress.Utils.WaitDialogForm wdf = null; |
| | | if (isLoading == true) |
| | | { |
| | | Size _size; string _caption; Color _color; Padding _pad; |
| | | (_size, _caption, _color, _pad) = getLoading(); |
| | | wdf = new DevExpress.Utils.WaitDialogForm("加载进度:" + meth, _caption, _size); |
| | | wdf.BackColor = _color; |
| | | wdf.Padding = _pad; |
| | | wdf.SetCaption("加载进度:" + meth); |
| | | wdf.Visible = isLoading; |
| | | } |
| | | HttpWebRequest request = null; |
| | | StreamWriter requestStream = null; |
| | | WebResponse response = null; |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | wdf.Close(); |
| | | if (wdf != null) |
| | | wdf.Close(); |
| | | LogHelper.Debug(url, param + ":" + ex.Message); |
| | | throw ex; |
| | | } |
| | |
| | | requestStream = null; |
| | | response = null; |
| | | } |
| | | wdf.Close(); |
| | | if (wdf != null) |
| | | wdf.Close(); |
| | | return responseStr; |
| | | } |
| | | |
| | |
| | | { |
| | | colmn.Visible = true; |
| | | colmn.OptionsColumn.ReadOnly = false; |
| | | }; |
| | | } |
| | | ; |
| | | if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui")) |
| | | { |
| | | colmn.Visible = !isEdt; |
| | |
| | | break; |
| | | } |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | //多选 |
| | | if (colType is RadioGroup) |
| | | { |
| | | var txt = colType as RadioGroup; |
| | | if (txt != null) |
| | | txt.SelectedIndex = int.Parse(strVal); |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | //时间 |
| | |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | //多选 |
| | | if (ctrl is RadioGroup) |
| | | { |
| | | var txt = ctrl as RadioGroup; |
| | | if (txt != null) |
| | | txt.SelectedIndex = 0; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | //时间 |
| | | if (ctrl is DateTimePicker) |
| | | { |
| | |
| | | if (ctrl is NumericUpDown) |
| | | { |
| | | var txt = ctrl as NumericUpDown; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | //多选 |
| | | if (ctrl is RadioGroup) |
| | | { |
| | | var txt = ctrl as RadioGroup; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | |
| | | } |
| | | }; |
| | | gridView1.OptionsView.ColumnAutoWidth = false;//自动调整列宽 |
| | | |
| | | if (isPostSearch == true) |
| | | { |
| | | gridView1.OptionsView.ShowGroupPanel = false; |
| | |
| | | //是否显示底部的过滤条 |
| | | // gridView1.OptionsView.ShowFilterPanelMode = DevExpress.XtraGrid.Views.Base.ShowFilterPanelMode.Never; |
| | | } |
| | | |
| | | // gridView1.Appearance.HeaderPanel.ForeColor = DevExpress.LookAndFeel.DXSkinColors.ForeColors.ControlText; |
| | | foreach (GridColumn column in gridView1.Columns) |
| | | { |
| | |
| | | column.OptionsFilter.AllowAutoFilter = false; |
| | | } |
| | | } |
| | | |
| | | gridView1.IndicatorWidth = 60; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | |
| | | { |
| | | int _handle = gridView1.FocusedRowHandle; |
| | | bool _bl = xtraTabControl1.TabPages[0].PageEnabled; |
| | | if (_bl == false) { return; }; |
| | | if (_bl == false) { return; } |
| | | ; |
| | | if (_handle < 0) |
| | | { |
| | | xtraTabControl1.SelectedTabPageIndex = -1; |
| | |
| | | txt_iCount_1.ReadOnly = true; |
| | | } |
| | | |
| | | |
| | | |
| | | #region 自定义进度条列 |
| | | |
| | | /// <summary> |
| | |
| | | // 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) |
| | | { |
| | |
| | | else |
| | | { |
| | | checkBoxColumn.Tag = "1"; |
| | | /********2025-07-23修补过滤bug 故注释 beg ************/ |
| | | //foreach (DataRow row in _Table.Rows) |
| | | //{ |
| | | // row["chkInt"] = true; |
| | | //} |
| | | /********2025-07-23修补过滤bug 故注释 end ************/ |
| | | /********2025-07-23修补过滤bug beg ************/ |
| | | System.Collections.IList ftRow = gridView1.DataController.GetAllFilteredAndSortedRows(); |
| | | System.Collections.ArrayList ftAry = new System.Collections.ArrayList(); |
| | | foreach (System.Data.DataRowView _ft in ftRow) |
| | | { |
| | | string guid = _ft["guid"].ToString(); |
| | | ftAry.Add(guid); |
| | | } |
| | | foreach (DataRow row in _Table.Rows) |
| | | { |
| | | row["chkInt"] = true; |
| | | if (ftAry.Contains(row["guid"].ToString())) |
| | | row["chkInt"] = true; |
| | | } |
| | | /********2025-07-23修补过滤bug end ************/ |
| | | } |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = _Table; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | //读取默认组织 |
| | | public static string GetFirstOrg(UserControl.UcLookOrg txt_erpSczz) |
| | |
| | | 其它入库检, |
| | | 销售退货入库检, |
| | | 超期检, |
| | | 委外退料入库检, |
| | | cqcjyes,//重检方案 |
| | | cqcjno,//重检方案 |
| | | 产线称重, |
| | | iqc称重, |
| | | 受托入库 |
| | | } |
| | | |
| | | |