| | |
| | | txt_name.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_status.Text.Trim()) || txt_status.SelectedIndex == 0) |
| | | if (string.IsNullOrEmpty(txt_isStatus.Text.Trim()) || txt_isStatus.SelectedIndex == 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("菜单状态不能为空!"); |
| | | txt_status.Focus(); |
| | | txt_isStatus.Focus(); |
| | | return; |
| | | } |
| | | string _upGuid = txt_upGuid.EditValue.ToString(); |
| | | if (txt_category.SelectedIndex == 2 && string.IsNullOrEmpty(_upGuid)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("按钮类型必须选择父级菜单!"); |
| | | txt_status.Focus(); |
| | | txt_isStatus.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | upGuid = _upGuid,//上级的主建 |
| | | name = txt_name.Text.Trim(),//名称 |
| | | icon = txt_icon.Text,//菜单图标 |
| | | status = txt_status.SelectedIndex,//状态 |
| | | isStatus = txt_isStatus.SelectedIndex,//状态 |
| | | formPath = txt_formPath.Text.Trim(),//窗体路径 |
| | | idx = int.Parse(txt_idx.Value.ToString()),//排序 |
| | | category = txt_category.SelectedIndex,//类型 |