Exemplo n.º 1
0
        internal List(OpenFormEvents openFormEvents)
        {
            InitializeComponent();

            ListObject = new List <Request>();

            _event = openFormEvents;
            DataGridList.ItemsSource = ListObject;
        }
Exemplo n.º 2
0
        internal List(OpenFormEvents openFormEvents)
        {
            InitializeComponent();

            ListObject      = new List <Base>();
            _generalMethods = new GeneralMethods();

            _event = openFormEvents;
            DataGridList.ItemsSource = ListObject;
        }
Exemplo n.º 3
0
        internal List(EF.IUnitOfWork unitOfWork, OpenFormEvents openFormEvents, RefreshDataGridEvents refreshDataGrid)
        {
            InitializeComponent();

            _unitOfWork = unitOfWork;

            _openFormEvents  = openFormEvents;
            _refreshDataGrid = refreshDataGrid;

            _refreshDataGrid.RefreshDataGrid += _refreshDataGrid_RefreshDataGrid;

            SetItemSourceDataGrid();
        }
Exemplo n.º 4
0
        internal Object(OpenFormEvents openFormEvents = null, Request @ref = null)
        {
            InitializeComponent();

            if (@ref == null)
            {
                Ref = new Request();
            }
            else
            {
                Ref = @ref;
            }

            DataContext = Ref;
            _event      = openFormEvents;
        }
Exemplo n.º 5
0
        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;
        }
Exemplo n.º 6
0
        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;
        }
Exemplo n.º 7
0
        internal Actions(OpenFormEvents openFormEvents)
        {
            InitializeComponent();

            Event = openFormEvents;
        }