public static FilterTreeViewModel <Quote, long> GetOpportunitiesFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Quote, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Category", x => x.QuotesStaticFilters, null, null),
                CreateUnitOfWork().Quotes, (recipient, handler) => RegisterEntityChangedMessageHandler <Quote, long>(recipient, handler)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <EmployeeTask, long> GetTasksFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <EmployeeTask, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, null, x => x.TasksStaticFilters, null, null),
                CreateUnitOfWork().Tasks, (recipient, handler) => RegisterEntityChangedMessageHandler <EmployeeTask, long>(recipient, handler)
                ).SetParentViewModel(parentViewModel));
 }
Beispiel #3
0
 public static FilterTreeViewModel <EmployeeTask, long> GetTasksFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <EmployeeTask, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Tasks", x => x.TasksStaticFilters, x => x.TasksCustomFilters, null, null, "By Employee"),
                CreateUnitOfWork().Tasks, new Action <object, Action>(RegisterEntityChangedMessageHandler <EmployeeTask, long>)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <Quote, long> GetOpportunitiesFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Quote, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, null, null, null, null),
                CreateUnitOfWork().Quotes.ActualQuotes(), new Action <object, Action>(RegisterEntityChangedMessageHandler <Quote, long>)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <Employee, long> GetDashboardFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Employee, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, null, null, null, null),
                CreateUnitOfWork().Employees, new Action <object, Action>(RegisterEntityChangedMessageHandler <Employee, long>)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <Customer, long> GetCustomersFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Customer, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Favorites", x => x.CustomersStaticFilters, x => x.CustomersCustomFilters, null,
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Customer().Id),
     }),
                CreateUnitOfWork().Customers, (recipient, handler) => RegisterEntityChangedMessageHandler <Customer, long>(recipient, handler)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <Employee, long> GetEmployeesFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Employee, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Status", x => x.EmployeesStaticFilters, x => x.EmployeesCustomFilters, null,
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Employee().FullName),
         BindableBase.GetPropertyName(() => new Employee().Id),
     }),
                CreateUnitOfWork().Employees, (recipient, handler) => RegisterEntityChangedMessageHandler <Employee, long>(recipient, handler)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <Product, long> GetProductsFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Product, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Category", x => x.ProductsStaticFilters, x => x.ProductsCustomFilters,
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Product().Id),
         BindableBase.GetPropertyName(() => new Product().EngineerId),
         BindableBase.GetPropertyName(() => new Product().SupportId),
         BindableBase.GetPropertyName(() => new Product().Support),
     }),
                CreateUnitOfWork().Products, (recipient, handler) => RegisterEntityChangedMessageHandler <Product, long>(recipient, handler)
                ).SetParentViewModel(parentViewModel));
 }
Beispiel #9
0
 public static FilterTreeViewModel <Customer, long> GetCustomersFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Customer, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Favorites", x => x.CustomersStaticFilters, x => x.CustomersCustomFilters,
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Customer().Id),
     },
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Customer().BillingAddress) + "." + BindableBase.GetPropertyName(() => new Address().City),
         BindableBase.GetPropertyName(() => new Customer().BillingAddress) + "." + BindableBase.GetPropertyName(() => new Address().State),
         BindableBase.GetPropertyName(() => new Customer().BillingAddress) + "." + BindableBase.GetPropertyName(() => new Address().ZipCode),
     }),
                CreateUnitOfWork().Customers, new Action <object, Action>(RegisterEntityChangedMessageHandler <Customer, long>)
                ).SetParentViewModel(parentViewModel));
 }
 public static FilterTreeViewModel <Order, long> GetSalesFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Order, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Category", x => x.OrdersStaticFilters, x => x.OrdersCustomFilters,
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Order().Id),
         BindableBase.GetPropertyName(() => new Order().CustomerId),
         BindableBase.GetPropertyName(() => new Order().EmployeeId),
         BindableBase.GetPropertyName(() => new Order().StoreId),
     },
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Order().Customer) + "." + BindableBase.GetPropertyName(() => new Customer().Name),
     }),
                CreateUnitOfWork().Orders, (recipient, handler) => RegisterEntityChangedMessageHandler <Order, long>(recipient, handler)
                ).SetParentViewModel(parentViewModel));
 }
Beispiel #11
0
 public static FilterTreeViewModel <Employee, long> GetEmployeesFilterTree(object parentViewModel)
 {
     return(FilterTreeViewModel <Employee, long> .Create(
                new FilterTreeModelPageSpecificSettings <Settings>(Settings.Default, "Status", x => x.EmployeesStaticFilters, x => x.EmployeesCustomFilters,
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Employee().FullNameBindable),
         BindableBase.GetPropertyName(() => new Employee().Id),
         BindableBase.GetPropertyName(() => new Employee().Picture),
         BindableBase.GetPropertyName(() => new Employee().PictureId),
     },
                                                                   new[] {
         BindableBase.GetPropertyName(() => new Employee().Address) + "." + BindableBase.GetPropertyName(() => new Address().City),
         BindableBase.GetPropertyName(() => new Employee().Address) + "." + BindableBase.GetPropertyName(() => new Address().State),
         BindableBase.GetPropertyName(() => new Employee().Address) + "." + BindableBase.GetPropertyName(() => new Address().ZipCode),
     }),
                CreateUnitOfWork().Employees, new Action <object, Action>(RegisterEntityChangedMessageHandler <Employee, long>)
                ).SetParentViewModel(parentViewModel));
 }
Beispiel #12
0
 void AddEmployeeFilter(FilterInfo filterInfo)
 {
     FilterTreeViewModel.AddCustomFilter(filterInfo.Name, Data.Filtering.CriteriaOperator.Parse(filterInfo.FilterCriteria));
 }
Beispiel #13
0
 void DeleteEmployeeFilters()
 {
     FilterTreeViewModel.CustomFilters.Where(x => IsEmployeeFilter(x))
     .ToList()
     .ForEach(x => FilterTreeViewModel.DeleteCustomFilter(x));
 }