public InspectionReportsViewModel(IMillReportsRepository repo, IUserNotify notify)
 {
     this.repo = repo;
     this.notify = notify;
     createCommand = ViewModelSource.Create<CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));
     previewCommand = ViewModelSource.Create<PreviewReportCommand>(() => new PreviewReportCommand(this, repo, 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 InspectionReportsViewModel(IMillReportsRepository repo, IUserNotify notify)
 {
     this.repo      = repo;
     this.notify    = notify;
     createCommand  = ViewModelSource.Create <CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));
     previewCommand = ViewModelSource.Create <PreviewReportCommand>(() => new PreviewReportCommand(this, repo, 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));
        }
 public PreviewReportCommand(
     ConstructionReportViewModel viewModel,
     IMillReportsRepository repo,
     IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo      = repo;
     this.notify    = notify;
 }
 public PreviewReportCommand(
     ConstructionReportViewModel viewModel, 
     IMillReportsRepository repo, 
     IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo = repo;
     this.notify = notify;
 }
Beispiel #8
0
 public CreatePipeReportCommand(
     PipeConstractionReportViewModel viewModel,
     IMillReportsRepository repo,
     IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo      = repo;
     this.notify    = notify;
 }
 public CreateRepoCommand(
     WeldDateReportViewModel viewModel,
     IMillReportsRepository repo,
     IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo      = repo;
     this.notify    = notify;
 }
 public CreateRepoCommand(
     WeldDateReportViewModel viewModel,
     IMillReportsRepository repo,
     IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo = repo;
     this.notify = notify;
 }
 public CreatePipeReportCommand(
     PipeConstractionReportViewModel viewModel,
     IMillReportsRepository repo,
     IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo = repo;
     this.notify = notify;
 }
 public MillReportsViewModel(IMillReportsRepository repo, IUserNotify notify, ICategoryRepository repoCategory)
 {
     this.repo = repo;
     this.notify = notify;
     this.repoCategory = repoCategory;
     createCommand = ViewModelSource.Create<CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));
     previewCommand = ViewModelSource.Create<PreviewReportCommand>(() => new PreviewReportCommand(this, repo, notify));
     GetAllCategories();
     LoadAllReportTypes();
 }
Beispiel #13
0
 public MillReportsViewModel(IMillReportsRepository repo, IUserNotify notify, ICategoryRepository repoCategory)
 {
     this.repo         = repo;
     this.notify       = notify;
     this.repoCategory = repoCategory;
     createCommand     = ViewModelSource.Create <CreateReportCommand>(() => new CreateReportCommand(this, repo, notify));
     previewCommand    = ViewModelSource.Create <PreviewReportCommand>(() => new PreviewReportCommand(this, repo, notify));
     GetAllCategories();
     LoadAllReportTypes();
 }
        public PipeConstractionReportViewModel(
            IMillReportsRepository repo, 
            IMillPipeSizeTypeRepository repoPipeType,
            IUserNotify notify)
        {
            this.repo = repo;
            this.notify = notify;
            this.repoPipeType = repoPipeType;

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

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

            pipeTypes = repoPipeType.GetAll();

            foreach (var pt in pipeTypes)
            {
                checkedPipeTypes.Add(pt);
            }
        }
Beispiel #15
0
        public PipeConstractionReportViewModel(
            IMillReportsRepository repo,
            IMillPipeSizeTypeRepository repoPipeType,
            IUserNotify notify)
        {
            this.repo         = repo;
            this.notify       = notify;
            this.repoPipeType = repoPipeType;

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

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

            pipeTypes = repoPipeType.GetAll();

            foreach (var pt in pipeTypes)
            {
                checkedPipeTypes.Add(pt);
            }
        }
 public CreateReportCommand(InspectionReportsViewModel viewModel, IMillReportsRepository repo, IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo = repo;
     this.notify = notify;
 }
 public CreateReportCommand(InspectionReportsViewModel viewModel, IMillReportsRepository repo, IUserNotify notify)
 {
     this.viewModel = viewModel;
     this.repo      = repo;
     this.notify    = notify;
 }