using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using DevExpress.Mvvm;
using DevExpress.Mvvm.POCO;
using DevExpress.DevAV.Common.Utils;
using DevExpress.DevAV.DevAVDbDataModel;
using DevExpress.Mvvm.DataModel;
using DevExpress.DevAV;
using DevExpress.DevAV.Common.ViewModel;
using DevExpress.Mvvm.ViewModel;
namespace DevExpress.DevAV.ViewModels {
///
/// Represents the single Quote object view model.
///
public partial class QuoteViewModel : SingleObjectViewModel {
///
/// Creates a new instance of QuoteViewModel as a POCO view model.
///
/// A factory used to create a unit of work instance.
public static QuoteViewModel Create(IUnitOfWorkFactory unitOfWorkFactory = null) {
return ViewModelSource.Create(() => new QuoteViewModel(unitOfWorkFactory));
}
///
/// Initializes a new instance of the QuoteViewModel class.
/// This constructor is declared protected to avoid undesired instantiation of the QuoteViewModel type without the POCO proxy factory.
///
/// A factory used to create a unit of work instance.
protected QuoteViewModel(IUnitOfWorkFactory unitOfWorkFactory = null)
: base(unitOfWorkFactory ?? UnitOfWorkSource.GetUnitOfWorkFactory(), x => x.Quotes, x => x.Number) {
}
///
/// The view model that contains a look-up collection of Customers for the corresponding navigation property in the view.
///
public IEntitiesViewModel LookUpCustomers {
get { return GetLookUpEntitiesViewModel((QuoteViewModel x) => x.LookUpCustomers, x => x.Customers); }
}
///
/// The view model that contains a look-up collection of CustomerStores for the corresponding navigation property in the view.
///
public IEntitiesViewModel LookUpCustomerStores {
get { return GetLookUpEntitiesViewModel((QuoteViewModel x) => x.LookUpCustomerStores, x => x.CustomerStores); }
}
///
/// The view model that contains a look-up collection of Employees for the corresponding navigation property in the view.
///
public IEntitiesViewModel LookUpEmployees {
get { return GetLookUpEntitiesViewModel((QuoteViewModel x) => x.LookUpEmployees, x => x.Employees); }
}
}
}