Beispiel #1
0
        public virtual ActionResult GetAll([DataSourceRequest] DataSourceRequest request,
                                           DateTime?dateFrom,
                                           DateTime?dateTo,
                                           string buyerName,
                                           string orderNumber)
        {
            LogI("GetAll");

            var filter = new CustomerFilterViewModel()
            {
                DateFrom    = dateFrom,
                DateTo      = dateTo,
                BuyerName   = buyerName,
                OrderNumber = orderNumber
            };

            request.Sorts = new List <SortDescriptor>()
            {
                new SortDescriptor("CreateDate", ListSortDirection.Descending)
            };
            var items      = CustomerViewModel.GetAll(Db, filter);
            var dataSource = items.ToDataSourceResult(request);

            return(new JsonResult {
                Data = dataSource, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
Beispiel #2
0
        public MainWindow()
        {
            InitializeComponent();

            NewCustomerForm.Visibility = Visibility.Hidden;

            Customer          customer;
            CustomerViewModel customerViewModel = new CustomerViewModel();

            customer = customerViewModel.GetById(16);
            DisplayProfile(customer);

            CustomerList.ItemsSource = customerViewModel.GetAll();
        }
Beispiel #3
0
        private void LoadList()
        {
            CustomerViewModel customerViewModel = new CustomerViewModel();

            CustomerList.ItemsSource = customerViewModel.GetAll();
        }