Esempio n. 1
0
        public RouteListWorkingJournalViewModel(
            RouteListJournalFilterViewModel filterViewModel,
            IUnitOfWorkFactory unitOfWorkFactory,
            ICommonServices commonServices,
            IRouteListRepository routeListRepository,
            IFuelRepository fuelRepository,
            ICallTaskRepository callTaskRepository,
            BaseParametersProvider baseParametersProvider,
            IExpenseParametersProvider expenseParametersProvider,
            ISubdivisionRepository subdivisionRepository,
            IAccountableDebtsRepository accountableDebtsRepository,
            IGtkTabsOpener gtkTabsOpener)
            : base(filterViewModel, unitOfWorkFactory, commonServices)
        {
            TabName = "Работа кассы с МЛ";

            _routeListRepository        = routeListRepository ?? throw new ArgumentNullException(nameof(routeListRepository));
            _fuelRepository             = fuelRepository ?? throw new ArgumentNullException(nameof(fuelRepository));
            _callTaskRepository         = callTaskRepository ?? throw new ArgumentNullException(nameof(callTaskRepository));
            _baseParametersProvider     = baseParametersProvider ?? throw new ArgumentNullException(nameof(baseParametersProvider));
            _expenseParametersProvider  = expenseParametersProvider ?? throw new ArgumentNullException(nameof(expenseParametersProvider));
            _subdivisionRepository      = subdivisionRepository ?? throw new ArgumentNullException(nameof(subdivisionRepository));
            _accountableDebtsRepository = accountableDebtsRepository ?? throw new ArgumentNullException(nameof(accountableDebtsRepository));
            _gtkTabsOpener = gtkTabsOpener ?? throw new ArgumentNullException(nameof(gtkTabsOpener));

            UseSlider = false;

            NotifyConfiguration.Enable();
            NotifyConfiguration.Instance.BatchSubscribeOnEntity <RouteList>(OnRouteListChanged);

            InitPopupActions();
        }
Esempio n. 2
0
        public RouteListWorkingJournalViewModel(
            RouteListJournalFilterViewModel filterViewModel,
            IUnitOfWorkFactory unitOfWorkFactory,
            ICommonServices commonServices,
            IRouteListRepository routeListRepository,
            FuelRepository fuelRepository,
            CallTaskRepository callTaskRepository,
            BaseParametersProvider baseParametersProvider,
            SubdivisionRepository subdivisionRepository) :
            base(filterViewModel, unitOfWorkFactory, commonServices)
        {
            TabName = "Работа кассы с МЛ";

            this.routeListRepository    = routeListRepository;
            this.fuelRepository         = fuelRepository;
            this.callTaskRepository     = callTaskRepository;
            this.baseParametersProvider = baseParametersProvider;
            this.subdivisionRepository  = subdivisionRepository;

            UseSlider = false;

            NotifyConfiguration.Enable();
            NotifyConfiguration.Instance.BatchSubscribeOnEntity <RouteList>(OnRouteListChanged);

            InitPopupActions();
        }
Esempio n. 3
0
        static void CreateBaseConfig()
        {
            logger.Info("Настройка параметров базы...");

            // Настройка ORM
            var db = FluentNHibernate.Cfg.Db.MySQLConfiguration.Standard
                     .Dialect <MySQL57ExtendedDialect>()
                     .ConnectionString(QSProjectsLib.QSMain.ConnectionString)
                     .AdoNetBatchSize(100)
                     .ShowSql()
                     .FormatSql();

            OrmConfig.ConfigureOrm(db, new System.Reflection.Assembly[] {
                System.Reflection.Assembly.GetAssembly(typeof(MainClass)),
                System.Reflection.Assembly.GetAssembly(typeof(MeasurementUnits)),
                System.Reflection.Assembly.GetAssembly(typeof(UserBase)),
                System.Reflection.Assembly.GetAssembly(typeof(HistoryMain)),
            });

                        #if DEBUG
            NLog.LogManager.Configuration.RemoveRuleByName("HideNhibernate");
                        #endif

            //Настраиваем классы сущностей
            OrmMain.AddObjectDescription(MeasurementUnitsOrmMapping.GetOrmMapping());
            //Спецодежда
            OrmMain.AddObjectDescription <RegulationDoc>().Dialog <RegulationDocDlg>().DefaultTableView().SearchColumn("Документ", i => i.Title).OrderAsc(i => i.Name).End();
            //Общее
            OrmMain.AddObjectDescription <UserBase>().DefaultTableView().Column("Имя", e => e.Name).End();
            OrmMain.AddObjectDescription <UserSettings>();
            //Склад
            OrmMain.AddObjectDescription <Income>().Dialog <Dialogs.Stock.IncomeDocDlg>();

            NotifyConfiguration.Enable();
            BuisnessLogicGlobalEventHandler.Init(new GtkQuestionDialogsInteractive());
            JournalsColumnsConfigs.RegisterColumns();
        }
        public RouteListJournalViewModel(
            RouteListJournalFilterViewModel filterViewModel,
            IRouteListRepository routeListRepository,
            IFuelRepository fuelRepository,
            ISubdivisionRepository subdivisionRepository,
            ICategoryRepository categoryRepository,
            ITrackRepository trackRepository,
            IUndeliveredOrdersRepository undeliveredOrdersRepository,
            IDeliveryShiftRepository deliveryShiftRepository,
            IUnitOfWorkFactory unitOfWorkFactory,
            IRouteListParametersProvider routeListParametersProvider,
            ICallTaskWorker callTaskWorker,
            IWarehouseRepository warehouseRepository,
            ICarJournalFactory carJournalFactory,
            IEmployeeJournalFactory employeeJournalFactory,
            IEmployeeRepository employeeRepository,
            IGtkTabsOpener gtkTabsOpener,
            IOrderSelectorFactory orderSelectorFactory,
            ICounterpartyJournalFactory counterpartyJournalFactory,
            IDeliveryPointJournalFactory deliveryPointJournalFactory,
            ISubdivisionJournalFactory subdivisionJournalFactory,
            IUndeliveredOrdersJournalOpener undeliveredOrdersJournalOpener,
            IStockRepository stockRepository,
            IReportPrinter reportPrinter,
            ITerminalNomenclatureProvider terminalNomenclatureProvider,
            IEmployeeSettings employeeSettings,
            ICommonServices commonServices)
            : base(filterViewModel, unitOfWorkFactory, commonServices)
        {
            _routeListRepository         = routeListRepository ?? throw new ArgumentNullException(nameof(routeListRepository));
            _fuelRepository              = fuelRepository ?? throw new ArgumentNullException(nameof(fuelRepository));
            _subdivisionRepository       = subdivisionRepository ?? throw new ArgumentNullException(nameof(subdivisionRepository));
            _categoryRepository          = categoryRepository ?? throw new ArgumentNullException(nameof(categoryRepository));
            _trackRepository             = trackRepository ?? throw new ArgumentNullException(nameof(trackRepository));
            _undeliveredOrdersRepository =
                undeliveredOrdersRepository ?? throw new ArgumentNullException(nameof(undeliveredOrdersRepository));
            _deliveryShiftRepository     = deliveryShiftRepository ?? throw new ArgumentNullException(nameof(deliveryShiftRepository));
            _routeListParametersProvider =
                routeListParametersProvider ?? throw new ArgumentNullException(nameof(routeListParametersProvider));
            _callTaskWorker              = callTaskWorker ?? throw new ArgumentNullException(nameof(callTaskWorker));
            _warehouseRepository         = warehouseRepository ?? throw new ArgumentNullException(nameof(warehouseRepository));
            _carJournalFactory           = carJournalFactory ?? throw new ArgumentNullException(nameof(carJournalFactory));
            _employeeJournalFactory      = employeeJournalFactory ?? throw new ArgumentNullException(nameof(employeeJournalFactory));
            _employeeRepository          = employeeRepository ?? throw new ArgumentNullException(nameof(employeeRepository));
            _gtkTabsOpener               = gtkTabsOpener ?? throw new ArgumentNullException(nameof(gtkTabsOpener));
            _orderSelectorFactory        = orderSelectorFactory ?? throw new ArgumentNullException(nameof(orderSelectorFactory));
            _counterpartyJournalFactory  = counterpartyJournalFactory ?? throw new ArgumentNullException(nameof(counterpartyJournalFactory));
            _deliveryPointJournalFactory =
                deliveryPointJournalFactory ?? throw new ArgumentNullException(nameof(deliveryPointJournalFactory));
            _subdivisionJournalFactory      = subdivisionJournalFactory ?? throw new ArgumentNullException(nameof(subdivisionJournalFactory));
            _undeliveredOrdersJournalOpener =
                undeliveredOrdersJournalOpener ?? throw new ArgumentNullException(nameof(undeliveredOrdersJournalOpener));
            _stockRepository = stockRepository ?? throw new ArgumentNullException(nameof(stockRepository));
            _reportPrinter   = reportPrinter ?? throw new ArgumentNullException(nameof(reportPrinter));
            _terminalNomenclatureProvider = terminalNomenclatureProvider ?? throw new ArgumentNullException(nameof(terminalNomenclatureProvider));
            _employeeSettings             = employeeSettings ?? throw new ArgumentNullException(nameof(employeeSettings));
            TabName = "Журнал МЛ";

            NotifyConfiguration.Enable();
            NotifyConfiguration.Instance.BatchSubscribeOnEntity <RouteList>(changeEvents => Refresh());

            InitPopupActions();
        }
 public void Init()
 {
     InitialiseNHibernate(typeof(RootDeleteItem).Assembly);
     NotifyConfiguration.Enable();
 }
Esempio n. 6
0
 public void Init()
 {
     InitialiseNHibernate(typeof(SimpleEntity).Assembly);
     NotifyConfiguration.Enable();
 }
Esempio n. 7
0
 public void Init()
 {
     ConfigureOneTime.ConfigureNh();
     InitialiseUowFactory();
     NotifyConfiguration.Enable();
 }