internal List(OpenFormEvents openFormEvents) { InitializeComponent(); ListObject = new List <Request>(); _event = openFormEvents; DataGridList.ItemsSource = ListObject; }
internal List(OpenFormEvents openFormEvents) { InitializeComponent(); ListObject = new List <Base>(); _generalMethods = new GeneralMethods(); _event = openFormEvents; DataGridList.ItemsSource = ListObject; }
internal List(EF.IUnitOfWork unitOfWork, OpenFormEvents openFormEvents, RefreshDataGridEvents refreshDataGrid) { InitializeComponent(); _unitOfWork = unitOfWork; _openFormEvents = openFormEvents; _refreshDataGrid = refreshDataGrid; _refreshDataGrid.RefreshDataGrid += _refreshDataGrid_RefreshDataGrid; SetItemSourceDataGrid(); }
internal Object(OpenFormEvents openFormEvents = null, Request @ref = null) { InitializeComponent(); if (@ref == null) { Ref = new Request(); } else { Ref = @ref; } DataContext = Ref; _event = openFormEvents; }
internal Object(OpenFormEvents openFormEvents = null, Base @ref = null) { InitializeComponent(); _generalMethods = new GeneralMethods(); if (@ref == null) { Ref = new Base(); } else { Ref = @ref; } DataContext = Ref; _event = openFormEvents; }
internal Object(EF.IUnitOfWork unitOfWork, OpenFormEvents openFormEvents, RefreshDataGridEvents refreshDataGrid, int?id = null) { InitializeComponent(); _unitOfWork = unitOfWork; _structures = new List <Models.BaseStructures>(); _openFormEvents = openFormEvents; _refreshDataGrid = refreshDataGrid; var _repoBase = _unitOfWork.GetRepository <Models.Base>(); var _repoStructures = _unitOfWork.GetRepository <Models.BaseStructures>(); if (id is int _id) { _ref = _repoBase.GetFirstOrDefault(f => f.Code == _id); _id = _ref.Code; ICollection <Models.BaseStructures> structures = _repoStructures.GetList(f => f.Base.Code == _ref.Code); _structures = _ref.Structures; DataGridBaseStructures.ItemsSource = _structures; Title += $" {_ref.Name}"; } else { _ref = new Models.Base(); Title += " (новый)"; } SetFormSettings(); DataContext = _ref; _unitOfWork = unitOfWork; }
internal Actions(OpenFormEvents openFormEvents) { InitializeComponent(); Event = openFormEvents; }