ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Project/06-PropManage/PropGroupTreeListCtrl.cs ÐÞ¸Ä |
| | |
| | | using DevExpress.XtraEditors; |
| | | using HStation.WinFrmUI.Xhs.Project; |
| | | using ISupply.WinFrmUI; |
| | | |
| | | namespace HStation.WinFrmUI.Xhs |
| | | namespace HStation.WinFrmUI.Basic |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public partial class PropGroupTreeListCtrl : XtraUserControl |
| | | public partial class SysPropGroupTreeListCtrl : XtraUserControl |
| | | { |
| | | public PropGroupTreeListCtrl() |
| | | public SysPropGroupTreeListCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | this.treeList1.InitialDefaultSettings(); |
| | |
| | | /// </summary> |
| | | public event Action<long> FocusedChangedEvent; |
| | | |
| | | private List<PropGroupTreeListViewModel> _allBindingList = null; |
| | | private List<SysPropGroupTreeListViewModel> _allBindingList = null; |
| | | |
| | | private Yw.BLL.SysPropGroup _bll = null; |
| | | |
| | |
| | | private async void TypeTreeListLookUpEdit1_SelectedChangedEvent(long ID) |
| | | { |
| | | _bll = new Yw.BLL.SysPropGroup(); |
| | | _allBindingList = new List<PropGroupTreeListViewModel>(); |
| | | _allBindingList = new List<SysPropGroupTreeListViewModel>(); |
| | | var alllist = await _bll.GetByTypeID(ID); |
| | | foreach (var item in alllist) |
| | | { |
| | | _allBindingList.Add(new PropGroupTreeListViewModel(item)); |
| | | _allBindingList.Add(new SysPropGroupTreeListViewModel(item)); |
| | | } |
| | | this.propGroupTreeListViewModelBindingSource.DataSource = _allBindingList; |
| | | this.propGroupTreeListViewModelBindingSource.ResetBindings(false); |
| | |
| | | //æ·»å |
| | | private void barBtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var dlg = new AddPropGrouoDlg(); |
| | | var dlg = new AddSysPropGrouoDlg(); |
| | | var vmID = this.typeTreeListLookUpEdit1.GetCurrentTypeID(); |
| | | dlg.SetBindingData(vmID); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | |
| | | if (id > 0) |
| | | { |
| | | var model = await _bll.GetByID(id); |
| | | _allBindingList.Add(new PropGroupTreeListViewModel(model)); |
| | | _allBindingList.Add(new SysPropGroupTreeListViewModel(model)); |
| | | this.propGroupTreeListViewModelBindingSource.ResetBindings(false); |
| | | return true; |
| | | } |
| | |
| | | MessageBoxHelper.ShowWarning("è¯·éæ©æ°æ®è¡!"); |
| | | return; |
| | | } |
| | | var dlg = new EditPropGrouoDlg(); |
| | | var dlg = new EditSysPropGrouoDlg(); |
| | | dlg.SetBindingData(vm.ID); |
| | | dlg.ReloadDataEvent += async (rhs) => |
| | | { |