| | |
| | | string _strCmd = txtJianYan.Text.Trim().ToUpper(); |
| | | string _strOK = "OK"; |
| | | string _strNG = "NG"; |
| | | int n = 0; |
| | | if ((_strCmd.StartsWith(_strOK) || _strCmd.StartsWith(_strNG))) |
| | | if (!(_strCmd.StartsWith(_strOK) || _strCmd.StartsWith(_strNG))) |
| | | { |
| | | if (!_strCmd.Contains("-")) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | string[] _ary = _strCmd.Split('-'); |
| | | if (_ary.Length != 2) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误::请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | string _str1 = _ary[0]; |
| | | if (!(_str1 == _strOK || _str1 == _strNG)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | string _str2 = _ary[1]; |
| | | if (int.TryParse(_str2, out n)) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | else |
| | | if (!_strCmd.Contains("-")) |
| | | { |
| | | if (int.TryParse(_strCmd, out n)) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | string[] _ary = _strCmd.Split('-'); |
| | | if (_ary.Length != 2) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("命令输入错误:请正确使用OK 或 NG 命令!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |