| | |
| | | /// <param name="_suppId">供应商</param> |
| | | /// <param name="_receiveOrgId">收料组织</param> |
| | | /// <param name="_isWw">是否委外</param> |
| | | public SelectSqmx() |
| | | /// <param name="defaultType">默认类型:1-生产,2-委外</param> |
| | | public SelectSqmx(string defaultType = "1") |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; |
| | |
| | | this.colChkInt.OptionsFilter.AllowFilter = false; |
| | | this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False; |
| | | radioGroup1.SelectedIndex = 0; |
| | | // 根据传入的默认类型设置单选按钮 |
| | | if (defaultType == "2") |
| | | { |
| | | radioGroup1.SelectedIndex = 1; // 委外 |
| | | } |
| | | else |
| | | { |
| | | radioGroup1.SelectedIndex = 0; // 生产 |
| | | } |
| | | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); |
| | | getPageList(1); |
| | | |
| | | // 添加事件处理程序,当radioGroup1选择变化时通知外部 |
| | | radioGroup1.SelectedIndexChanged += (s, e) => |
| | | { |
| | | // 触发自定义事件,传递当前选择的类型(生产或委外) |
| | | SelectionTypeChanged?.Invoke(this, new UpdateParentEventArgs { Data = (radioGroup1.SelectedIndex + 1).ToString() }); |
| | | getPageList(1); |
| | | |
| | | }; |
| | | |
| | | btnIn.Click += (s, e) => |
| | | { |
| | | gridView1.PostEditor(); |
| | |
| | | } |
| | | } |
| | | } |
| | | UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringList = list , Data = workId , DynamicList = list_gd }); Close(); |
| | | UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringList = list , Data = workId , DynamicList = list_gd ,}); Close(); |
| | | }; |
| | | radioGroup1.SelectedIndexChanged += (s, e) => |
| | | { |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 当选择类型(生产/委外)发生变化时触发的事件 |
| | | /// </summary> |
| | | public event EventHandler<UpdateParentEventArgs> SelectionTypeChanged; |
| | | |
| | | /// <summary> |
| | | /// 选择后的回调事件 |
| | | /// </summary> |
| | | public event EventHandler<UpdateParentEventArgs> UpdateParent; |