public JointDeactivationCommand(IConstructionRepository repo, JointNewEditViewModel viewModel, IUserNotify notify, ISecurityContext ctx)
 {
     this.repo = repo;
     this.viewModel = viewModel;
     this.notify = notify;
     this.ctx = ctx;
 }
Example #2
0
 public CountryController(ICountryRepository countryRepository, ICountryService countryService, IPresidentVotingRepository presidentVotingRepository, IWarService warService,
                          ITransactionsService transactionService, IWarRepository warRepository, IRegionService regionService, IRegionRepository regionRepository, IEmbargoService embargoService,
                          IEmbargoRepository embargoRepository, IWalletRepository walletRepository, IPopupService popupService, ICountryTreasureService countryTreasureService,
                          IWalletService walletService, ICompanyService companyService, IMPPService mppService, IMilitaryProtectionPactRepository mppRepository,
                          IMilitaryProtectionPactOfferRepository mppOfferRepository, ITransactionScopeProvider transactionScopeProvider, IConstructionRepository constructionRepository,
                          IConstructionService constructionService) : base(popupService)
 {
     this.countryRepository         = countryRepository;
     this.countryService            = countryService;
     this.presidentVotingRepository = presidentVotingRepository;
     this.warService               = warService;
     this.transactionService       = transactionService;
     this.warRepository            = warRepository;
     this.regionService            = regionService;
     this.regionRepository         = regionRepository;
     this.embargoService           = embargoService;
     this.embargoRepository        = embargoRepository;
     this.walletRepository         = walletRepository;
     this.countryTreasureService   = countryTreasureService;
     this.walletService            = walletService;
     this.companyService           = companyService;
     this.mppService               = mppService;
     this.mppRepository            = mppRepository;
     this.mppOfferRepository       = mppOfferRepository;
     this.transactionScopeProvider = transactionScopeProvider;
     this.constructionRepository   = constructionRepository;
     this.constructionService      = constructionService;
 }
Example #3
0
 public NewSaveJointCommand(IConstructionRepository repo, JointNewEditViewModel viewModel, IUserNotify notify, ISecurityContext ctx)
 {
     this.repo      = repo;
     this.viewModel = viewModel;
     this.notify    = notify;
     this.ctx       = ctx;
 }
 public ConstructionController(
     IRepository <Construction> genericRepository,
     IConstructionRepository <Construction> constructionRepository)
 {
     this.genericRepository      = genericRepository;
     this.constructionRepository = constructionRepository;
 }
Example #5
0
 public DefenseSystemService(IWalletService walletService, IConstructionRepository constructionRepository, ITransactionScopeProvider transactionScopeProvider,
                             ICompanyService companyService)
 {
     this.walletService          = Attach(walletService);
     this.constructionRepository = constructionRepository;
     this.companyService         = companyService;
 }
Example #6
0
 public ConstructionHandler(IOwnerRepository PPREP, IResponsibleRepository RREP,
                            IConstructionRepository OREP, IParticipantRepository PAREP)
 {
     _PPREP = PPREP;
     _RREP  = RREP;
     _OREP  = OREP;
     _PAREP = PAREP;
 }
Example #7
0
 public JointCutCommand(
     IConstructionRepository repo,
     JointNewEditViewModel viewModel,
     IUserNotify notify)
 {
     this.repo      = repo;
     this.viewModel = viewModel;
     this.notify    = notify;
 }
 public ConstructionController(IConstructionRepository constructionRepository, IPopupService popupService, IConstructionService constructionService,
                               ICountryRepository countryRepository, IMarketOfferRepository marketOfferRepository, IMarketService marketService) : base(popupService)
 {
     this.constructionRepository = constructionRepository;
     this.constructionService    = constructionService;
     this.countryRepository      = countryRepository;
     this.marketOfferRepository  = marketOfferRepository;
     this.marketService          = marketService;
 }
Example #9
0
 public JointCutCommand(
     IConstructionRepository repo, 
     JointNewEditViewModel viewModel, 
     IUserNotify notify)
 {
     this.repo = repo;
     this.viewModel = viewModel;
     this.notify = notify;
 }
Example #10
0
 public HospitalService(IHospitalRepository hospitalRepository, IWalletService walletService, IEquipmentService equipmentService,
                        IReservedEntityNameRepository reservedEntityNameRepository, IRegionRepository regionRepository, ICompanyService companyService,
                        ITransactionsService transactionsService, IConstructionRepository constructionRepository)
 {
     this.hospitalRepository           = hospitalRepository;
     this.walletService                = Attach(walletService);
     this.equipmentService             = Attach(equipmentService);
     this.reservedEntityNameRepository = reservedEntityNameRepository;
     this.regionRepository             = regionRepository;
     this.companyService               = Attach(companyService);
     this.transactionsService          = Attach(transactionsService);
     this.constructionRepository       = constructionRepository;
 }
 public ConstructionService(IDefenseSystemService defenseSystemService, IConstructionRepository constructionRepository, ICompanyService companyService,
                            IHospitalService hospitalService, IReservedEntityNameRepository reservedEntityNameRepository, IRemovalService removalService, IWalletService walletService, IWarningService warningService,
                            IWalletRepository walletRepository)
 {
     this.defenseSystemService         = defenseSystemService;
     this.constructionRepository       = constructionRepository;
     this.companyService               = companyService;
     this.hospitalService              = hospitalService;
     this.reservedEntityNameRepository = reservedEntityNameRepository;
     this.removalService               = removalService;
     this.walletService    = walletService;
     this.warningService   = warningService;
     this.walletRepository = walletRepository;
 }
Example #12
0
 public ConstructionService(IConstructionRepository repository)
 {
     _repository = repository;
 }
        public JointNewEditViewModel(
            IConstructionRepository repoConstruction,
            IUserNotify notify,
            Guid id,
            Prizm.Data.DAL.IMillReportsRepository adoRepo,
            ISecurityContext ctx)
        {
            this.repoConstruction = repoConstruction;
            this.JointId          = id;
            this.notify           = notify;
            this.adoRepo          = adoRepo;
            this.ctx = ctx;

            #region Commands
            saveOrUpdateJointCommand =
                ViewModelSource.Create(() => new SaveOrUpdateJointCommand(repoConstruction, this, notify, ctx));
            saveJointCommand =
                ViewModelSource.Create(() => new SaveJointCommand(repoConstruction, this, notify, ctx));
            newSaveJointCommand =
                ViewModelSource.Create(() => new NewSaveJointCommand(repoConstruction, this, notify, ctx));
            extractOperationsCommand =
                ViewModelSource.Create(() => new ExtractOperationsCommand(repoConstruction, this, notify));
            jointdeactivationCommand =
                ViewModelSource.Create(() => new JointDeactivationCommand(repoConstruction, this, notify, ctx));
            jointCutCommand =
                ViewModelSource.Create(() => new JointCutCommand(repoConstruction, this, notify));
            quickSearchCommand =
                ViewModelSource.Create(() => new QuickSearchCommand(this, repoConstruction.RepoJoint, notify));
            #endregion
            try
            {
                Inspectors = repoConstruction.RepoInspector.GetAll();
                if (this.Inspectors == null || this.Inspectors.Count <= 0)
                {
                    log.Warn(string.Format("Joint (id:{0}) creation: List of Inspectors is NULL or empty", this.JointId));
                }

                Welders = repoConstruction.RepoWelder.GetAll();
                if (this.Welders == null || this.Welders.Count <= 0)
                {
                    log.Warn(string.Format("Joint (id:{0}) creation: List of Welders is NULL or empty", this.JointId));
                }

                Pieces = adoRepo.GetPipelineElements();
                if (this.Pieces == null || this.Pieces.Rows.Count <= 0)
                {
                    log.Warn(string.Format("Joint (id:{0}) creation: Data Table of Pieces is NULL or empty", this.JointId));
                }

                extractOperationsCommand.Execute();

                if (id == Guid.Empty)
                {
                    NewJoint();
                }
                else
                {
                    this.Joint = repoConstruction.RepoJoint.Get(id);

                    RefreshJointData();
                }
            }
            catch (RepositoryException ex)
            {
                log.Warn("JointNewEditViewModel " + ex.ToString());
                notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message),
                                   Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header));
            }
        }
Example #14
0
 public ExtractOperationsCommand(IConstructionRepository repo, JointNewEditViewModel viewModel)
 {
     this.repo      = repo;
     this.viewModel = viewModel;
 }
Example #15
0
        public JointNewEditViewModel(
            IConstructionRepository repoConstruction,
            IUserNotify notify,
            Guid id,
            Prizm.Data.DAL.IMillReportsRepository adoRepo,
            ISecurityContext ctx)
        {
            this.repoConstruction = repoConstruction;
            this.JointId          = id;
            this.notify           = notify;
            this.adoRepo          = adoRepo;
            this.ctx = ctx;

            #region Commands
            saveOrUpdateJointCommand =
                ViewModelSource.Create(() => new SaveOrUpdateJointCommand(repoConstruction, this, notify, ctx));
            saveJointCommand =
                ViewModelSource.Create(() => new SaveJointCommand(repoConstruction, this, notify, ctx));
            newSaveJointCommand =
                ViewModelSource.Create(() => new NewSaveJointCommand(repoConstruction, this, notify, ctx));
            extractOperationsCommand =
                ViewModelSource.Create(() => new ExtractOperationsCommand(repoConstruction, this));
            jointdeactivationCommand =
                ViewModelSource.Create(() => new JointDeactivationCommand(repoConstruction, this, notify, ctx));
            jointCutCommand =
                ViewModelSource.Create(() => new JointCutCommand(repoConstruction, this, notify));
            #endregion

            Inspectors = repoConstruction.RepoInspector.GetAll();
            if (this.Inspectors == null || this.Inspectors.Count <= 0)
            {
                log.Warn(string.Format("Joint (id:{0}) creation: List of Inspectors is NULL or empty", this.JointId));
            }

            Welders = repoConstruction.RepoWelder.GetAll();
            if (this.Welders == null || this.Welders.Count <= 0)
            {
                log.Warn(string.Format("Joint (id:{0}) creation: List of Welders is NULL or empty", this.JointId));
            }

            Pieces = adoRepo.GetPipelineElements();
            if (this.Pieces == null || this.Pieces.Rows.Count <= 0)
            {
                log.Warn(string.Format("Joint (id:{0}) creation: Data Table of Pieces is NULL or empty", this.JointId));
            }

            extractOperationsCommand.Execute();

            if (id == Guid.Empty)
            {
                NewJoint();
            }
            else
            {
                this.Joint = repoConstruction.RepoJoint.Get(id);

                if (Joint.FirstElement != null &&
                    Joint.SecondElement != null &&
                    Joint.Status != Domain.Entity.Construction.JointStatus.Withdrawn)
                {
                    this.firstElement  = GetPartDataFromList(Joint.FirstElement, GetPart(Joint.FirstElement));
                    this.secondElement = GetPartDataFromList(Joint.SecondElement, GetPart(Joint.SecondElement));

                    Joint.FirstElement  = this.firstElement;
                    Joint.SecondElement = this.secondElement;
                }
                else
                {
                    log.Warn(string.Format("Joint #{0} do not has connected Parts or is Withdrawn.", Joint.Number));
                }

                var weldResults = repoConstruction.RepoJointWeldResult.GetByJoint(this.Joint);
                if (weldResults != null)
                {
                    jointWeldResults = new BindingList <JointWeldResult>(weldResults);
                }
                else
                {
                    log.Warn(string.Format("Joint #{0} do not have Welding Results.", Joint.Number));
                }

                var testResults = repoConstruction.RepoJointTestResult.GetByJoint(this.Joint);
                if (testResults != null)
                {
                    jointTestResults = new BindingList <JointTestResult>(testResults);
                }
                else
                {
                    log.Warn(string.Format("Joint #{0} do not have Test Results.", Joint.Number));
                }
            }
        }
Example #16
0
 public ReportHandler(IResponsibleRepository RREP, IConstructionRepository OREP, IReportRepository RLREP)
 {
     _RREP  = RREP;
     _OREP  = OREP;
     _RLREP = RLREP;
 }