| | |
| | | using System.Net.Http; |
| | | using System.Reflection; |
| | | using System.Resources; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Text; |
| | | using System.Text.RegularExpressions; |
| | | using System.Threading.Tasks; |
| | |
| | | if (ctrl is CheckEdit) |
| | | { |
| | | var txt = ctrl as CheckEdit; |
| | | txt.ReadOnly = isEdt; |
| | | if (txt.Tag != null && txt.Tag.ToString().Length > 0 && txt.Tag.ToString().StartsWith("moren")) |
| | | if (_isRead(txt.Tag)) |
| | | { |
| | | txt.Checked = bool.Parse(txt.Tag.ToString().Replace("moren.", "")); |
| | | txt.ReadOnly = true; |
| | | } |
| | | else |
| | | txt.Checked = false; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | |
| | | } |
| | | //自定义仓库 |
| | | if (ctrl is UcLookCk) |
| | |
| | | return 0; |
| | | } |
| | | } |
| | | public static decimal? GetDecimal(string s) |
| | | { |
| | | if (string.IsNullOrEmpty(s)) return null; |
| | | return decimal.Parse(s); |
| | | } |
| | | public static int ToInt(string str) |
| | | { |
| | | try |
| | |
| | | GridView dgv = s as GridView; |
| | | if (dgv != null) |
| | | { |
| | | if (dgv.GetSelectedRows() != null) |
| | | if (dgv.GetSelectedRows() != null && dgv.GetSelectedRows().Count()>0) |
| | | { |
| | | var selectedRow = dgv.GetSelectedRows()[0]; // 获取第一个选中行的索引 |
| | | if (selectedRow >= 0) |