| | |
| | | { |
| | | isEdt = !isEdt; |
| | | if (gridViews != null) |
| | | foreach (var gv in gridViews) |
| | | foreach (var gv in gridViews) { |
| | | foreach (GridColumn colmn in gv.Columns) { |
| | | if (colmn.Name == "gvMxDel") |
| | | { |
| | | colmn.Visible = !isEdt; |
| | | break; |
| | | } |
| | | } |
| | | gv.OptionsBehavior.Editable = !isEdt; |
| | | |
| | | } |
| | | var _btnAry= controls.Find("btnSelect", false); |
| | | if (_btnAry.Length > 0) { |
| | | var _btnType = _btnAry[0]; |
| | | _btnType.Enabled = !isEdt; |
| | | } |
| | | |
| | | var _btnAry2 = controls.Find("btnTui", false); |
| | | if (_btnAry2.Length > 0) |
| | | { |
| | | var _btnType = _btnAry2[0]; |
| | | _btnType.Enabled = !isEdt; |
| | | } |
| | | foreach (JProperty property in dynamicObject.Properties()) |
| | | { |
| | | var strName = property.Name; |
| | |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | |
| | | if (colType is MemoEdit) |
| | | { |
| | | var txt = colType as MemoEdit; |
| | | if (txt != null) |
| | | txt.Text = strVal; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | |
| | | //数字卡 |
| | | if (colType is NumericUpDown) |
| | | { |
| | |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | //自定义物料 |
| | | if (colType is UcLookItems) |
| | | { |
| | | var txt = colType as UcLookItems; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | if (colType is SimpleButton) |
| | | { |
| | | var txt = colType as SimpleButton; |
| | |
| | | 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) |
| | | { |
| | |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | //自定义物料 |
| | | if (ctrl is UcLookItems) |
| | | { |
| | | var txt = ctrl as UcLookItems; |
| | | txt.SetIdOrCode("-1"); |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | if (ctrl is SimpleButton) |
| | | { |
| | | var txt = ctrl as SimpleButton; |
| | |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | |
| | | if (ctrl is MemoEdit) |
| | | { |
| | | var txt = ctrl as MemoEdit; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | //数字卡 |
| | | if (ctrl is NumericUpDown) |
| | | { |
| | |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | |
| | | //下拉 |
| | | if (ctrl is UcComBox) |
| | | { |