| | |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.Office.Model; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid; |
| | |
| | | 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) |
| | | { |
| | |
| | | var txt = colType as Label; |
| | | if (_dddddd == "txt_checkStatus") |
| | | { |
| | | if (strVal == "True") |
| | | if (strVal == "True" || strVal=="1") |
| | | txt.Text = "已审核"; |
| | | if (strVal == "False") |
| | | if (strVal == "False" || strVal=="0" || strVal=="") |
| | | txt.Text = "未审核"; |
| | | } |
| | | else |
| | |
| | | txt.Text = strVal; |
| | | } |
| | | } |
| | | |
| | | //自定义仓库 |
| | | if (colType is UcLookCk) |
| | | { |
| | | var txt = colType as UcLookCk; |
| | | txt.SetCode( strVal); |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | //自定义供应商 |
| | | if (colType is UcLookSupplier) |
| | | { |
| | | var txt = colType as UcLookSupplier; |
| | | txt.SetCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | if (colType is SimpleButton) |
| | | { |
| | | var txt = colType as UcLookCk; |
| | | txt.SetCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | txt.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | |
| | | //单选 |
| | | if (ctrl is CheckBox) |
| | | { |
| | | var txt = ctrl as CheckBox; |
| | | txt.Checked = false; |
| | | txt.Enabled = !isEdt; |
| | | } |
| | | if (ctrl is CheckEdit) |
| | | { |
| | | var txt = ctrl as CheckEdit; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | //单选 |
| | | if (ctrl is CheckBox) ctrl.Enabled = !isEdt; |
| | | if (ctrl is CheckBox) { |
| | | ctrl.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | |
| | | if (ctrl is CheckEdit) |
| | | { |
| | | var txt = ctrl as CheckEdit; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | _strGuid = dr["guid"].ToString(); |
| | | _strName = dr[2].ToString(); |
| | | _strName = dr[1].ToString(); |
| | | } |
| | | } |
| | | |