1
lu
2024-12-10 ddd9b50f12ac0bd6a4cd0870f3ea06f0ea579520
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -128,7 +128,7 @@
                request.Timeout = 15000;
                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);
@@ -604,7 +604,28 @@
                                txt.Enabled = false;
                            continue;
                        }
                        //自定用户
                        if (colType is UcLookUser)
                        {
                            var txt = colType as UcLookUser;
                            txt.SetIdOrCode(strVal);
                            if (txt.IsReadly == false)
                                txt.Enabled = !isEdt;
                            else
                                txt.Enabled = false;
                            continue;
                        }
                        //自定打印机
                        if (colType is UcLookPrint)
                        {
                            var txt = colType as UcLookPrint;
                            txt.SetIdOrCode(strVal);
                            if (txt.IsReadly == false)
                                txt.Enabled = !isEdt;
                            else
                                txt.Enabled = false;
                            continue;
                        }
                        if (colType is SimpleButton)
                        {
                            var txt = colType as SimpleButton;
@@ -683,7 +704,12 @@
                if (ctrl is TextEdit)
                {
                    var txt = ctrl as TextEdit;
                    txt.Text = "";
                    if (txt.Tag != null && txt.Tag.ToString().Length > 0 && txt.Tag.ToString().StartsWith("moren"))
                    {
                        txt.Text = txt.Tag.ToString().Replace("moren.", "");
                    }
                    else
                        txt.Text = "";
                    txt.ReadOnly = isEdt;
                    continue;
                }
@@ -706,7 +732,7 @@
                if (ctrl is CheckBox)
                {
                    var txt = ctrl as CheckBox;
                    txt.Checked = false;
                    //txt.Checked = false;
                    txt.Enabled = !isEdt;
                }
                if (ctrl is CheckEdit)
@@ -784,6 +810,22 @@
                if (ctrl is UcLookOrg)
                {
                    var txt = ctrl as UcLookOrg;
                    txt.SetIdOrCode("-1");
                    txt.Enabled = !isEdt;
                    continue;
                }
                //自定用户
                if (ctrl is UcLookUser)
                {
                    var txt = ctrl as UcLookUser;
                    txt.SetIdOrCode("-1");
                    txt.Enabled = !isEdt;
                    continue;
                }
                //自定打印机
                if (ctrl is UcLookPrint)
                {
                    var txt = ctrl as UcLookPrint;
                    txt.SetIdOrCode("-1");
                    txt.Enabled = !isEdt;
                    continue;
@@ -959,6 +1001,26 @@
                if (ctrl is UcLookOrg)
                {
                    var txt = ctrl as UcLookOrg;
                    if (txt.IsReadly == false)
                        txt.Enabled = !isEdt;
                    else
                        txt.Enabled = false;
                    continue;
                }
                //自定用户
                if (ctrl is UcLookUser)
                {
                    var txt = ctrl as UcLookUser;
                    if (txt.IsReadly == false)
                        txt.Enabled = !isEdt;
                    else
                        txt.Enabled = false;
                    continue;
                }
                //自定打印
                if (ctrl is UcLookPrint)
                {
                    var txt = ctrl as UcLookPrint;
                    if (txt.IsReadly == false)
                        txt.Enabled = !isEdt;
                    else
@@ -1362,8 +1424,7 @@
        /// <param name="icoName">图标路径</param>
        public static void SetGridSear(GridView gridView1, PictureBox btnChkIco = null, Form fm = null, string fileName = "checkStatus", string icoName = "")
        {
         //   gridView1.OptionsView.ColumnAutoWidth = false;自动调整列宽
            //   gridView1.OptionsView.ColumnAutoWidth = false;自动调整列宽
            foreach (GridColumn column in gridView1.Columns)
            {
                column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains;
@@ -1460,7 +1521,7 @@
            return regex.IsMatch(str);
        }
    }