public MaximoWorkOrderService(IWorkOrderRepository repo, WoTask woTask, ModelTaskRecord taskRecord)
        {
            _repo = repo;

            _processor = new WorkOrderSoapProcessorFactory().GetWorkOrderSoapProcessor();

            _woTask = woTask;

            _taskRecord = taskRecord;
        }
        public MCSWorkOrderService(IWorkOrderRepository repo, CMMSConfig settings, WoTask woTask, ModelTaskRecord taskRecord)
        {
            _repo = repo;

            _processor = new WorkOrderSoapProcessorFactory().GetWorkOrderSoapProcessor();

            _settings = settings;

            _woTask = woTask;

            _taskRecord = taskRecord;
        }
Пример #3
0
        public IWorkOrderService GetWorkOrderService(WoTask woTask, ModelTaskRecord taskRecord)
        {
            var connStr = ConfigurationManager.ConnectionStrings["CWConnectionString"].ConnectionString;

            var _repo = new WorkOrderRepositoryFactory().GetWorkOrderRepository(connStr);

            var settings = _repo.GetSettings(taskRecord.Bid);

            switch (settings.VendorId)
            {
            case 1:
                return(null);

            case 2:
                return(new MaximoWorkOrderService(_repo, woTask, taskRecord));

            case 3:
                return(new MCSWorkOrderService(_repo, settings, woTask, taskRecord));

            default:
                return(null);
            }
        }