| | |
| | | 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; |
| | |
| | | { |
| | | isEdt = !isEdt; |
| | | if (gridViews != null) |
| | | foreach (var gv in gridViews) { |
| | | foreach (GridColumn colmn in gv.Columns) { |
| | | foreach (var gv in gridViews) |
| | | { |
| | | foreach (GridColumn colmn in gv.Columns) |
| | | { |
| | | if (colmn.Name.ToString().Contains("gvMxDel")) |
| | | { |
| | | colmn.Visible = !isEdt; |
| | |
| | | } |
| | | gv.OptionsBehavior.Editable = !isEdt; |
| | | } |
| | | var _btnAry= controls.Find("btnSelect", false); |
| | | if (_btnAry.Length > 0) { |
| | | var _btnAry = controls.Find("btnSelect", false); |
| | | if (_btnAry.Length > 0) |
| | | { |
| | | var _btnType = _btnAry[0]; |
| | | _btnType.Enabled = !isEdt; |
| | | } |
| | |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | |
| | | |
| | | //数字卡 |
| | | if (colType is NumericUpDown) |
| | | { |
| | |
| | | var txt = colType as Label; |
| | | if (_dddddd == "txt_checkStatus") |
| | | { |
| | | if (strVal == "True" || strVal=="1") |
| | | if (strVal == "True" || strVal == "1") |
| | | txt.Text = "已审核"; |
| | | if (strVal == "False" || strVal=="0" || strVal=="") |
| | | if (strVal == "False" || strVal == "0" || strVal == "") |
| | | txt.Text = "未审核"; |
| | | } |
| | | else |
| | |
| | | if (colType is UcLookCk) |
| | | { |
| | | var txt = colType as UcLookCk; |
| | | txt.SetIdOrCode( strVal); |
| | | txt.Enabled = !isEdt; |
| | | txt.SetIdOrCode(strVal); |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | //自定义供应商 |
| | |
| | | { |
| | | var txt = colType as UcLookSupplier; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | //自定义物料 |
| | |
| | | { |
| | | var txt = colType as UcLookItems; |
| | | txt.SetIdOrCode(strVal); |
| | | txt.Enabled = !isEdt; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | if (colType is SimpleButton) |
| | |
| | | } |
| | | |
| | | //单选 |
| | | if (ctrl is CheckBox) { |
| | | if (ctrl is CheckBox) |
| | | { |
| | | ctrl.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | |
| | | return Guid.Parse(str); |
| | | } |
| | | |
| | | public static int ToInt(string str) { |
| | | public static int ToInt(string str) |
| | | { |
| | | try |
| | | { |
| | | return int.Parse(str); |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | return 0; |
| | | } |
| | | } |
| | | public static long ToLong(string str) |
| | | { |
| | | try |
| | | { |
| | | return long.Parse(str); |
| | | } |
| | | catch (Exception) |
| | | { |
| | |
| | | else |
| | | { |
| | | _strGuid = dr["guid"].ToString(); |
| | | _strName = dr[1].ToString(); |
| | | _strName = dr[1].ToString(); |
| | | } |
| | | } |
| | | |