public AdminLinksViewModel(IAdminLinksView view, IAccessSettings accessSettings)
            : base(view)
        {
            thisView = view;

            //
            //tatScheduleViewModel.View


            //

            //
            //

            VolumeAdjustmentCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(volumeAdjustsmentViewModel.View)
            };

            TatScheduleCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(tatScheduleViewModel.View)
            };


            PasswordChangeCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(this.passwordChangeViewModel.View)
            };
        }
        public ContractDetailsViewModel(IContractDetailsView view)
            : base(view)
        {
            _view = view;
            PaymentTermsTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreatePaymentTermsRepository();
            InvoiceTarget      = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceGroupRepository();
            SelectedGroups     = new ObservableCollection <InvoiceGroup>();
            ContractTarget     = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateContractRepository();

            AddGroupsCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (SelectedGroups.Count > 0 && CurrentContract != null),
                ExecuteDelegate    = x => AddGroups()
            };

            RemoveGroupsCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentContract != null && SelectedGroups.Count > 0),
                ExecuteDelegate    = x => RemoveGroups()
            };

            PopCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentContract != null),
                ExecuteDelegate    = x => view.Pop()
            };
        }
        public AdminTatScheduleViewModel(IAdminTatScheduleView view)
            : base(view)
        {
            ThisView       = view;
            TatSchedTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateTatSchedRepository();
            TatRateTarget  = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateTatRateRepository();

            SaveTRCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (TRModified == true),
                ExecuteDelegate    = x => SaveTRChanges()
            };

            CancelTRCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (TRModified == true),
                ExecuteDelegate    = x => CancelTRChanges()
            };

            PickTATSchedCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => PickTATSched()
            };
        }
Пример #4
0
        public OverridesViewModel(IOverridesView view)
            : base(view)
        {
            ThisView = view;

            InvoiceGrpOverrideTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceGrpOverrideRepository();
            InvoiceGroupTarget       = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceGroupRepository();

            SaveCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (Modified),
                ExecuteDelegate    = x => Save()
            };
            CancelCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (Modified),
                ExecuteDelegate    = x => Restore()
            };
        }
        protected ContractRateViewModel(IContractRateView view)
            : base(view)
        {
            _view = view;
            ContractRateTarget    = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateContractRateRepository();
            ContractRateAltTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateContractRateAltRepository();
            ChargeMethodTarget    = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateChargeMethodRepository();
            StatCompMethodTarget  = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateStatCompMethodRepository();
            FaxCompMethodTarget   = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateFaxCompMethodRepository();

            ChargeMethods   = ChargeMethodTarget.GetChargeMethods();
            StatCompMethods = StatCompMethodTarget.GetStatCompMethods();
            FaxCompMethods  = FaxCompMethodTarget.GetFaxCompMethods();

            PopCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (SelectedContractRate != null),
                ExecuteDelegate    = x => view.Pop()
            };
        }
        public TatScheduleViewModel(ITatScheduleView view)
            : base(view)
        {
            ThisView           = view;
            ContractRateTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateContractRateRepository();

            TatSchedTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateTatSchedRepository();

            ContractTatSchedTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateContractTatSchedRepository();

            SaveCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (Modified == true && SelectedTatSched != null),
                ExecuteDelegate    = x => SaveContractTatSchedule()
            };

            CancelCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (Modified == true),
                ExecuteDelegate    = x => Restore()
            };
        }
Пример #7
0
        public ReportLinksViewModel(IReportLinksView view, IAccessSettings accessSettings)
            : base(view)
        {
            thisView = view;

            //
            //tatScheduleViewModel.View


            //

            //
            //

            JumpToNoValidContract = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(errNoValidContractViewModel.View)
            };

            JumpToClientWorkType = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(errClientWorkTypeViewModel.View)
            };

            JumpToBatchJob = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(this.batchJobViewModel.View)
            };

            JumpToAuditLog = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (true),
                ExecuteDelegate    = x => SetRightView(this.auditLogViewModel.View)
            };
        }
        public AddOnChargesViewModel(IAddOnChargesView view)
            : base(view)
        {
            ThisView = view;

            QtyRuleTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateQtyRuleRepository();

            AddOnChgSchedTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateAddOnChgSchedRepository();

            AddOnChgTypeTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateAddOnChgTypeRepository();

            FreqsTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateFreqRepository();

            ActiveScheduleTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateActiveScheduleRepository();

            SaveCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (Modified && SelectedAddOnChgType != null && SelectedFreq != null && SelectedQtyRule != null),
                ExecuteDelegate    = x => Save()
            };
            DeleteCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (SelectedAddOnChgSched != null),
                ExecuteDelegate    = x => Remove()
            };
            NewCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (!Modified),
                ExecuteDelegate    = x => New()
            };
            CancelCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (Modified),
                ExecuteDelegate    = x => Restore()
            };
        }
        /// <summary>
        /// Ctor uses a of Models
        /// </summary>
        /// <param name="notes">List<ContractNote></param>
        public DetailInvoiceFileVM(ReportTypeTable _Table)
        {
            Target = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceDetailRepository();

            table = Target.MakeReportTable();

            SelectedGrid = new ObservableCollection <object>();
            SelectedData = new ObservableCollection <object>();
            status       = "Ok";
#if TOO_SLOW
            table.ParseEntireTable();
#endif
            SaveCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (HasErrorVM == null),
                ExecuteDelegate    = x => Save()
            };

            NoSaveCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (HasErrorVM == null),
                ExecuteDelegate    = x => NoSave()
            };

            CancelCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => !IsBusy,
                ExecuteDelegate    = x => Cancel()
            };

            NewTypeCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => (HasErrorVM == null),
                ExecuteDelegate    = x => NewType()
            };

            RemoveTypeCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => !IsBusy,
                ExecuteDelegate    = x => RemoveType()
            };

            SQLCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => !IsBusy,
                ExecuteDelegate    = x => SwapMode()
            };

            ShiftLeftCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => !IsBusy,
                ExecuteDelegate    = x => ShiftLeft()
            };

            ShiftRightCommand = new SimpleCommand
            {
                CanExecuteDelegate = x => !IsBusy,
                ExecuteDelegate    = x => ShiftRight()
            };

            Package = Table[0];
            //Package = Table[ Table.Count - 1 ];
        }
        public InvoiceGrpDetailViewModel(IInvoiceGrpDetailView view)
            : base(view)
        {
            ThisView = view;
            BillingSpecialistTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateBillingSpecialistRepository();
            FreqsTarget             = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateFreqRepository();
            PlatformsTarget         = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreatePlatformRepository();
            BrandsTarget            = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateBrandRepository();
            ReportTypesTarget       = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateReportTypeRepository();
            DeliveryMethodsTarget   = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateDeliveryMethodsRepository();
            InvoiceGrpReportsTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceGrpReportRepository();
            RemitToTarget           = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateRemitToRepository();
            ExtClientTarget         = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateExtClientRepository();
            DataTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceGroupRepository();

            ContractTarget         = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateContractRepository();
            InvoiceStyleTarget     = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceStyleRepository();
            InvoiceGrpStatusTarget = Spheris.Billing.Data.BillingDataFactory.NewInstance().CreateInvoiceGrpStatusRepository();

            //ContractTarget.ConnectionString.Segments

            if (true /*DB.Connnected*/)
            {
                List <ReportType> lst = ReportTypesTarget.GetReportTypesAsList();
                if (lst != null)
                {
                    ReportTypes = new ObservableReportTypes(ReportTypesTarget.GetReportTypesAsList());
                    ReportTypes.ForEach((types, report) => AddWeakEventListener(report, ReportListener));
                    safeReportTypes = new ObservableReportTypes(ReportTypes, true);
                }
            }



            OnPropertyChanged(new PropertyChangedEventArgs("ItemsSource"));

            SaveCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (HasErrorVM == false && Modified == true),
                ExecuteDelegate    = x => SaveInvoice()
            };

            AddNewCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (Modified == false && PopSwitch == false),
                ExecuteDelegate    = x => AddNewInvoice()
            };

            // Restore the changes
            RestoreCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (Modified == true),
                ExecuteDelegate    = x => CancelChanges()
            };

            DeleteCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentGroupItem != null),
                ExecuteDelegate    = x => DeleteInvoice()
            };

            PopCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentGroupItem != null),
                ExecuteDelegate    = x =>
                {
                    if (notAssignedLocations == null)
                    {
                        NotAssignedLocations = this.ExtClientTarget.FetchLocations(0, false);
                    }
                    view.Pop();
                }
            };

            AddLocationsCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (HasSelections == true && CurrentGroupItem != null),
                ExecuteDelegate    = x => AddLocations()
            };

            UnassignLocationsCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentGroupItem != null && SelectedClientLocations.Count > 0),
                ExecuteDelegate    = x => UnassignLocations()
            };

            FilterByContractCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentGroupItem != null && CurrentGroupItem.ContractID != null),
                ExecuteDelegate    = x => FilterByContract()
            };

            JumpToContractCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentGroupItem != null && CurrentGroupItem.ContractID != null),
                ExecuteDelegate    = x => JumpToContract()
            };

            BrowseFolderCommand = new MedQuist.BillingAdmin.ViewModels.SimpleCommand
            {
                CanExecuteDelegate = x => (CurrentGroupItem != null && CurrentGroupItem.ContractID != null),
                ExecuteDelegate    = x => BrowseFolder()
            };

            NoSaveCommand = RestoreCommand;

            SelectedNALocations     = new ObservableCollection <ClientLocation> ();
            SelectedClientLocations = new ObservableCollection <ClientLocation>();
        }