| | |
| | | { |
| | | if (string.IsNullOrEmpty(txt_defectCode.Text)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("编号不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("编号不能为空!"); |
| | | txt_defectCode.Focus(); |
| | | return; |
| | | } |
| | | if (txt_sType.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("类型不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("类型不能为空!"); |
| | | txt_sType.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_defectName.Text)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("名称不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("名称不能为空!"); |
| | | txt_defectName.Focus(); |
| | | return; |
| | | } |
| | |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringSingle = "" }); |
| | | Close(); |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | txt_defectCode.Text = dy.maxNo; |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |