lu
4 天以前 dd0af4a5532c251fd655024ba475f72eaf9c93a0
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -62,13 +62,17 @@
        /// <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;
@@ -103,7 +107,8 @@
            }
            catch (Exception ex)
            {
                wdf.Close();
                if (wdf != null)
                    wdf.Close();
                LogHelper.Debug(url, param + ":" + ex.Message);
                throw ex;
            }
@@ -113,7 +118,8 @@
                requestStream = null;
                response = null;
            }
            wdf.Close();
            if (wdf != null)
                wdf.Close();
            return responseStr;
        }
@@ -268,7 +274,8 @@
                        {
                            colmn.Visible = true;
                            colmn.OptionsColumn.ReadOnly = false;
                        };
                        }
                        ;
                        if (colmn.Name.ToString().Contains("gvMxDel") || colmn.Name.ToString().Contains("gvMxTui"))
                        {
                            colmn.Visible = !isEdt;
@@ -458,7 +465,7 @@
                        {
                            var txt = colType as RadioGroup;
                            if (txt != null)
                                txt.SelectedIndex =int.Parse( strVal);
                                txt.SelectedIndex = int.Parse(strVal);
                            txt.ReadOnly = isEdt;
                            continue;
                        }
@@ -788,6 +795,7 @@
                    }
                    else
                        txt.ReadOnly = isEdt;
                    txt.Checked = false;
                    continue;
                }
                //自定义仓库
@@ -1702,16 +1710,20 @@
        }
        public delegate void DelegateGetModel(string guid);
        public delegate void DelegateGetList(int currentPage);
        /// <summary>
        /// 设置主表的样式
        ///
        /// </summary>
        /// <param name="gridView1">gridview</param>
        /// <param name="picCheckBox">图标按钮</param>
        /// <param name="fm"></param>
        /// <param name="fm">窗体</param>
        /// <param name="fileName">字段</param>
        /// <param name="icoName">图标路径</param>
        /// <param name="action"></param>
        public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null, DevExpress.Utils.ToolTipController tips = null, bool isPostSearch = true)
        /// <param name="action">委托1</param>
        /// <param name="tips">鸟嘴提示</param>
        /// <param name="isPostSearch"></param>
        /// <param name="action2">委托2</param>
        public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null, DevExpress.Utils.ToolTipController tips = null, bool isPostSearch = true, DelegateGetModel action2 = null)
        {
            gridView1.PopupMenuShowing += (s, e) =>
            {
@@ -1817,6 +1829,21 @@
                        view.ActiveEditor.MouseUp += ActiveEditor_MouseUp;
                };
            }
            if (action2 != null) {
                gridView1.FocusedRowChanged += (s, e) =>
                {
                    int _handle = gridView1.FocusedRowHandle;
                    if (_handle == -1)
                        return;
                    DataRow row = gridView1.GetDataRow(_handle);
                    if (row == null)
                        return;
                    string _guid = row["guid"].ToString();
                    if (string.IsNullOrEmpty(_guid))
                        return;
                    action2(_guid);
                };
            }
            gridView1.RowStyle += (s, e) =>
            {
                //默认选中行不变色
@@ -1901,6 +1928,7 @@
                };
            }
        }
        private static void ActiveEditor_MouseUp(object sender, MouseEventArgs e)
        {
            BaseEdit edit = sender as BaseEdit;
@@ -1933,7 +1961,8 @@
                {
                    int _handle = gridView1.FocusedRowHandle;
                    bool _bl = xtraTabControl1.TabPages[0].PageEnabled;
                    if (_bl == false) { return; };
                    if (_bl == false) { return; }
                    ;
                    if (_handle < 0)
                    {
                        xtraTabControl1.SelectedTabPageIndex = -1;
@@ -2477,6 +2506,9 @@
        委外退料入库检,
        cqcjyes,//重检方案
        cqcjno,//重检方案
        产线称重,
        iqc称重,
        受托入库
    }