public JointSearchViewModel(IJointRepository repo, IUserNotify notify)
 {
     this.repo = repo;
     this.notify = notify;
     searchCommand = ViewModelSource.Create(() => new JointSearchCommand(this, repo, notify));
     LoadStatuses();
 }
Exemple #2
0
 public JointSearchCommand(JointSearchViewModel vm, IJointRepository repo,
                           IUserNotify notify)
 {
     viewModel   = vm;
     this.repo   = repo;
     this.notify = notify;
 }
        public ConstructionReportViewModel(
            IMillReportsRepository repo, 
            IJointRepository repoJoint, 
            IUserNotify notify)
        {
            this.repo = repo;
            this.notify = notify;
            this.repoJoint = repoJoint;

            this.JointsProjections = repoJoint
                .GetJointsProjections()
                .SetResultTransformer(Transformers.AliasToBean<JointProjection>())
                .List<JointProjection>();

            if (this.JointsProjections == null || this.JointsProjections.Count <= 0)
                log.Warn( "Report at Construction: List of Joints is NULL or empty." );

            createCommand = ViewModelSource
                .Create<CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));

            previewCommand = ViewModelSource
                .Create<PreviewReportCommand>(() => new PreviewReportCommand(this, repo, notify));

            reportCommand = ViewModelSource
                .Create<ReportCommand>(() => new ReportCommand(this, repo, repoJoint, notify));

        }
        public ConstructionReportViewModel(
            IMillReportsRepository repo,
            IJointRepository repoJoint,
            IUserNotify notify)
        {
            this.repo      = repo;
            this.notify    = notify;
            this.repoJoint = repoJoint;

            this.JointsProjections = repoJoint
                                     .GetJointsProjections()
                                     .SetResultTransformer(Transformers.AliasToBean <JointProjection>())
                                     .List <JointProjection>();

            if (this.JointsProjections == null || this.JointsProjections.Count <= 0)
            {
                log.Warn("Report at Construction: List of Joints is NULL or empty.");
            }

            createCommand = ViewModelSource
                            .Create <CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));

            previewCommand = ViewModelSource
                             .Create <PreviewReportCommand>(() => new PreviewReportCommand(this, repo, notify));

            reportCommand = ViewModelSource
                            .Create <ReportCommand>(() => new ReportCommand(this, repo, repoJoint, notify));
        }
        public ConstructionReportViewModel(
            IMillReportsRepository repo,
            IJointRepository repoJoint,
            IUserNotify notify)
        {
            this.repo   = repo;
            this.notify = notify;

            this.data = repo.GetPipelineElements(SQLProvider.GetQuery(SQLProvider.SQLStatic.GetWeldedParts).ToString());
            if (this.data == null || this.data.Rows.Count <= 0)
            {
                log.Warn("Report at Construction: Data Table of Pieces is NULL or empty.");
            }

            this.partDataList = FormWeldedParts(data);

            this.Joints = repoJoint.GetAll()
                          .Where <construct.Joint>(x => x.FirstElement != null && x.SecondElement != null)
                          .ToList <construct.Joint>();
            if (this.Joints == null || this.Joints.Count <= 0)
            {
                log.Warn("Report at Construction: List of Joints is NULL or empty.");
            }


            createCommand = ViewModelSource
                            .Create <CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));

            previewCommand = ViewModelSource
                             .Create <PreviewReportCommand>(() => new PreviewReportCommand(this, repo, notify));

            reportCommand = ViewModelSource
                            .Create <ReportCommand>(() => new ReportCommand(this, repo, notify));
        }
Exemple #6
0
 public JointSearchViewModel(IJointRepository repo, IUserNotify notify)
 {
     this.repo     = repo;
     this.notify   = notify;
     searchCommand = ViewModelSource.Create(() => new JointSearchCommand(this, repo, notify));
     LoadStatuses();
 }
 public JointSearchCommand(JointSearchViewModel vm, IJointRepository repo,
     IUserNotify notify)
 {
     viewModel = vm;
     this.repo = repo;
     this.notify = notify;
 }
 public ExportRepository(ISession session)
 {
    pipeRepo = new PipeRepository(session);
    portionRepo = new PortionRepository(session);
    projectRepo = new ProjectRepository(session);
    jointRepo = new JointRepository(session);
    componentRepo = new ComponentRepository(session);
 }
Exemple #9
0
 public ExportRepository(ISession session)
 {
     pipeRepo      = new PipeRepository(session);
     portionRepo   = new PortionRepository(session);
     projectRepo   = new ProjectRepository(session);
     jointRepo     = new JointRepository(session);
     componentRepo = new ComponentRepository(session);
 }
 public PartInspectionRepository(ISession session)
 {
     this.session = session;
     this.repoInspector = new InspectorRepository(session);
     this.repoInspectionTestResult = new InspectionTestResultRepository(session);
     this.repoPipe = new PipeRepository(session);
     this.repoSpool = new SpoolRepository(session);
     this.repoComponent = new ComponentRepository(session);
     this.repoJoint = new JointRepository(session);
 }
 public PartInspectionRepository(ISession session)
 {
     this.session                  = session;
     this.repoInspector            = new InspectorRepository(session);
     this.repoInspectionTestResult = new InspectionTestResultRepository(session);
     this.repoPipe                 = new PipeRepository(session);
     this.repoSpool                = new SpoolRepository(session);
     this.repoComponent            = new ComponentRepository(session);
     this.repoJoint                = new JointRepository(session);
 }
Exemple #12
0
 public ReportCommand(
     ConstructionReportViewModel viewModel,
     IMillReportsRepository repo,
     IJointRepository repoJoint,
     IUserNotify notify)
 {
     this.repoJoint = repoJoint;
     this.repo      = repo;
     this.viewModel = viewModel;
     this.notify    = notify;
 }
Exemple #13
0
 public ReportCommand(
     ConstructionReportViewModel viewModel,
     IMillReportsRepository repo,
     IJointRepository repoJoint,
     IUserNotify notify)
 {
     this.repoJoint = repoJoint;
     this.repo = repo;
     this.viewModel = viewModel;
     this.notify = notify;
 }
Exemple #14
0
        public ConstructionRepository(ISession session)
        {
            this.session             = session;
            this.repoJoint           = new JointRepository(session);
            this.repoJointTestResult = new JointTestResultRepository(session);
            this.repoJointWeldResult = new JointWeldResultRepository(session);
            this.repoJointOperation  = new JointOperationRepository(session);
            this.repoInspector       = new InspectorRepository(session);
            this.repoWelder          = new WelderRepository(session);

            this.repoPipe      = new PipeRepository(session);
            this.repoSpool     = new SpoolRepository(session);
            this.repoComponent = new ComponentRepository(session);
            this.fileRepo      = new FileRepository(session);
        }
        public ConstructionRepository(ISession session)
        {
            this.session = session;
            this.repoJoint = new JointRepository(session);
            this.repoJointTestResult = new JointTestResultRepository(session);
            this.repoJointWeldResult = new JointWeldResultRepository(session);
            this.repoJointOperation = new JointOperationRepository(session);
            this.repoInspector = new InspectorRepository(session);
            this.repoWelder = new WelderRepository(session);

            this.repoPipe = new PipeRepository(session);
            this.repoSpool = new SpoolRepository(session);
            this.repoComponent = new ComponentRepository(session);
            this.fileRepo = new FileRepository(session);
        }
 public ImportRepository(ISession session)
 {
    pipeRepo = new PipeRepository(session);
    plateRepo = new PlateRepository(session);
    heatRepo = new HeatRepository(session);
    railcarRepo = new RailcarRepository(session);
    releaseNoteRepo = new ReleaseNoteRepository(session);
    plateManufacturerRepo = new PlateManufacturerRepository(session);
    sizeTypeRepo = new MillPipeSizeTypeRepository(session);
    seamTypeRepo = new SeamTypeRepository(session);
    orderRepo = new PurchaseOrderRepository(session);
    fileRepo = new FileRepository(session);
    projectRepo = new ProjectRepository(session);
    portionRepo = new PortionRepository(session);
    jointRepo = new JointRepository(session);
    componentRepo = new ComponentRepository(session);
    spoolRepo = new SpoolRepository(session);
    componentTypeRepo = new ComponentTypeRepository(session);
 }
Exemple #17
0
 public ImportRepository(ISession session)
 {
     pipeRepo              = new PipeRepository(session);
     plateRepo             = new PlateRepository(session);
     heatRepo              = new HeatRepository(session);
     railcarRepo           = new RailcarRepository(session);
     releaseNoteRepo       = new ReleaseNoteRepository(session);
     plateManufacturerRepo = new PlateManufacturerRepository(session);
     sizeTypeRepo          = new MillPipeSizeTypeRepository(session);
     seamTypeRepo          = new SeamTypeRepository(session);
     orderRepo             = new PurchaseOrderRepository(session);
     fileRepo              = new FileRepository(session);
     projectRepo           = new ProjectRepository(session);
     portionRepo           = new PortionRepository(session);
     jointRepo             = new JointRepository(session);
     componentRepo         = new ComponentRepository(session);
     spoolRepo             = new SpoolRepository(session);
     componentTypeRepo     = new ComponentTypeRepository(session);
 }
Exemple #18
0
 public JointSearchCommand(JointSearchViewModel vm, IJointRepository repo)
 {
     viewModel = vm;
     this.repo = repo;
 }
Exemple #19
0
 public JointSearchViewModel(IJointRepository repo)
 {
     this.repo     = repo;
     searchCommand = ViewModelSource.Create(() => new JointSearchCommand(this, repo));
     LoadStatuses();
 }