using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace IStation.WinFrmUI.Product
{
public partial class SelectProductGroupDlg : DevExpress.XtraEditors.XtraForm
{
public SelectProductGroupDlg()
{
InitializeComponent();
this.IconOptions.Icon = WinFrmUI.Properties.Resources.app;
this.layoutControl1.SetupLayoutControl();
}
///
/// 回调事件
///
public event Action ReloadDataEvent;
///
/// 绑定数据
///
public void SetBindingData(long CorpID, string BelongType, long BelongID)
{
this.productGroupTreeListCtrl1.SetBindingData(CorpID, BelongType, BelongID);
}
//确定
private void btnOk_Click(object sender, EventArgs e)
{
var group = this.productGroupTreeListCtrl1.GetFocused();
if (group == null)
{
XtraMessageBox.Show("请选择设备组!");
return;
}
this.ReloadDataEvent?.Invoke(group);
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}