lu
2025-01-09 e1dbb26b92643e7d78ffa8548586af38e2f1dc11
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -358,7 +358,6 @@
                                    txt.Text = strVal;
                                }
                            else
                                txt.Text = strVal;
                            txt.ReadOnly = isEdt;
@@ -391,7 +390,12 @@
                            var txt = colType as MemoEdit;
                            if (txt != null)
                                txt.Text = strVal;
                            txt.ReadOnly = isEdt;
                            if (_isRead(txt.Tag))
                            {
                                txt.ReadOnly = true;
                            }
                            else
                                txt.ReadOnly = isEdt;
                            continue;
                        }
                        //数字卡
@@ -432,18 +436,25 @@
                        {
                            var txt = colType as CheckBox;
                            if (txt != null)
                                txt.Checked = bool.Parse(strVal);
                                switch (strVal)
                                {
                                    case "True":
                                        txt.Checked = true;
                                        break;
                                    case "1":
                                        txt.Checked = true;
                                        break;
                                    case "False":
                                        txt.Checked = false;
                                        break;
                                    default:
                                        txt.Checked = false;
                                        break;
                                }
                            txt.Enabled = !isEdt;
                            continue;
                        }
                        if (colType is CheckEdit)
                        {
                            var txt = colType as CheckEdit;
                            if (txt != null)
                                txt.Checked = bool.Parse(strVal);
                            txt.ReadOnly = isEdt;
                            continue;
                        }
                        //时间
                        if (colType is DateTimePicker)
                        {
@@ -702,8 +713,18 @@
                if (ctrl is MemoEdit)
                {
                    var txt = ctrl as MemoEdit;
                    txt.Text = "";
                    txt.ReadOnly = isEdt;
                    if (txt.Tag != null && txt.Tag.ToString().Length > 0 && txt.Tag.ToString().StartsWith("moren"))
                    {
                        txt.Text = txt.Tag.ToString().Replace("moren.", "");
                    }
                    else
                        txt.Text = "";
                    if (_isRead(txt.Tag))
                    {
                        txt.ReadOnly = true;
                    }
                    else
                        txt.ReadOnly = isEdt;
                    continue;
                }
                //下拉
@@ -744,14 +765,7 @@
                        txt.ReadOnly = isEdt;
                    continue;
                }
                if (ctrl is MemoEdit)
                {
                    var txt = ctrl as MemoEdit;
                    if (txt != null)
                        txt.Text = "";
                    txt.ReadOnly = isEdt;
                    continue;
                }
                //时间
                if (ctrl is DateTimePicker)
                {
@@ -951,7 +965,12 @@
                if (ctrl is MemoEdit)
                {
                    var txt = ctrl as MemoEdit;
                    txt.ReadOnly = isEdt;
                    if (_isRead(txt.Tag))
                    {
                        txt.ReadOnly = true;
                    }
                    else
                        txt.ReadOnly = isEdt;
                    continue;
                }
                //数字卡