Ejemplo n.º 1
0
        public StoreSalesInfo ReviewSalesResponsibility()
        {
            var ssi = Container.NewViewModel <StoreSalesInfo>();

            ssi.PopulateUsingKeys(new string[] { AccountNumber, false.ToString() });
            return(ssi);
        }
Ejemplo n.º 2
0
        //To test a ViewModelEdit
        public EmailTemplate CreateEmail()
        {
            var email = Container.NewViewModel <EmailTemplate>();

            email.Status = EmailStatus.New;
            return(email);
        }
Ejemplo n.º 3
0
        public QuickOrderForm QuickOrder([ContributedAction(subMenu)] Customer customer)
        {
            var qo = Container.NewViewModel <QuickOrderForm>();

            qo.Customer = customer;
            return(qo);
        }
        public CustomerDashboard CustomerDashboard(string accountNumber)
        {
            Customer cust = FindCustomerByAccountNumber(accountNumber);
            var      dash = Container.NewViewModel <CustomerDashboard>();

            dash.Root = cust;
            return(dash);
        }
        public CustomerCollectionViewModel ShowCustomersWithAddressInRegion(CountryRegion region, [ContributedAction] IQueryable <Customer> customers)
        {
            List <Customer> cc   = customers.Where(c => c.Addresses.Any(a => a.Address.StateProvince.CountryRegion == region)).ToList();
            var             ccvm = Container.NewViewModel <CustomerCollectionViewModel>();

            ccvm.Customers = cc.ToList();
            return(ccvm);
        }
        public QuickOrderForm AddDetail([FindMenu] Product product, short number)
        {
            var ol = Container.NewViewModel <OrderLine>();

            ol.Product = product;
            ol.Number  = number;
            details.Add(ol);

            return(this);
        }
        public void PopulateUsingKeys(string[] instanceId)
        {
            string an = instanceId.First();

            Customer = Container.Instances <Customer>().Single(c => c.AccountNumber == an);

            for (int i = 1; i < instanceId.Count(); i = i + 2)
            {
                var dKeys = new[] { instanceId[i], instanceId[i + 1] };
                var d     = Container.NewViewModel <OrderLine>();
                d.PopulateUsingKeys(dKeys);
                details.Add(d);
            }
        }