예제 #1
0
        public ActionResult Create(Kona.Data.Page p) {
            if (String.IsNullOrEmpty(p.Title)) {
                this.ModelState.AddModelError("notitle", "The page must have a title");
                return View("NewPage");
            } else {
                p.PageID = Guid.NewGuid();
                p.LanguageCode = System.Globalization.CultureInfo.CurrentCulture.TwoLetterISOLanguageName;
                p.Slug = p.Title.CreateSlug();
                p.CreatedBy = User.Identity.Name;
                p.ModifiedBy = User.Identity.Name;
                //p.Url = p.Slug;

                if (ModelState.IsValid) {
                    p.Add(User.Identity.Name);
                }
                return RedirectToAction("Edit", new { id = p.PageID });
            }
        }
예제 #2
0
 partial void DeleteInventoryRecord(Kona.Linq.Model.InventoryRecord instance);
예제 #3
0
        public ActionResult Shipping(Kona.Data.Address address) {

            if (ModelState.IsValid) {

                //save the address
                this.CurrentCart.ShippingAddress = Address.SaveIfNotExists(address);

                //calc the tax
                this.CurrentCart.TaxAmount = _pluginEngine.CalculateTax(this.SiteData.TaxPlugin, this.CurrentCart);

                //save the cart
                //_customerService.SaveCustomer(this.CurrentCustomer);
                this.CurrentCart.Save();

                //send to billing
                return RedirectToAction("Billing");
            }
            else {
                //let error handling pick it up
                return View("Shipping");
            }
        }
예제 #4
0
 partial void DeleteTaxRate(Kona.Linq.Model.TaxRate instance);
예제 #5
0
 partial void DeleteShippingMethod(Kona.Linq.Model.ShippingMethod instance);
예제 #6
0
 partial void DeleteProducts_Related(Kona.Linq.Model.Products_Related instance);
예제 #7
0
 partial void DeleteProducts_CrossSell(Kona.Linq.Model.Products_CrossSell instance);
예제 #8
0
 partial void DeleteProduct(Kona.Linq.Model.Product instance);
예제 #9
0
 partial void UpdateOrder(Kona.Linq.Model.Order instance);
예제 #10
0
 partial void InsertOrder(Kona.Linq.Model.Order instance);
예제 #11
0
 partial void DeleteOrderItem(Kona.Linq.Model.OrderItem instance);
예제 #12
0
 partial void UpdateOrderItem(Kona.Linq.Model.OrderItem instance);
예제 #13
0
 partial void InsertOrderItem(Kona.Linq.Model.OrderItem instance);
예제 #14
0
 partial void DeleteInventoryStatus(Kona.Linq.Model.InventoryStatus instance);
예제 #15
0
 partial void InsertInventoryStatus(Kona.Linq.Model.InventoryStatus instance);
예제 #16
0
 partial void InsertProduct(Kona.Linq.Model.Product instance);
예제 #17
0
 partial void UpdateProduct(Kona.Linq.Model.Product instance);
예제 #18
0
 partial void DeleteOrder(Kona.Linq.Model.Order instance);
예제 #19
0
 partial void InsertProducts_CrossSell(Kona.Linq.Model.Products_CrossSell instance);
예제 #20
0
 partial void InsertOrderStatus(Kona.Linq.Model.OrderStatus instance);
예제 #21
0
 partial void InsertProducts_Related(Kona.Linq.Model.Products_Related instance);
예제 #22
0
 partial void DeleteOrderStatus(Kona.Linq.Model.OrderStatus instance);
예제 #23
0
 partial void InsertShippingMethod(Kona.Linq.Model.ShippingMethod instance);
예제 #24
0
 partial void InsertProductDescriptor(Kona.Linq.Model.ProductDescriptor instance);
예제 #25
0
 partial void InsertTaxRate(Kona.Linq.Model.TaxRate instance);
예제 #26
0
 partial void DeleteProductDescriptor(Kona.Linq.Model.ProductDescriptor instance);
예제 #27
0
        public ActionResult Billing(Kona.Data.Address address) {

            if (ModelState.IsValid) {

                //save the address
                this.CurrentCart.BillingAddress = Address.SaveIfNotExists(address); ;

                //set the shipping methods
                this.ShippingMethods = _pluginEngine.CalculateShipping(this.SiteData.ShippingPlugin, this.CurrentCart); ;

                //default to the first
                this.CurrentCart.SetSelectedShipping(this.ShippingMethods[0]);
                
                //save the cart
                this.CurrentCart.Save();

                //send them to Finalize
                return RedirectToAction("Finalize");
            }
            else {
                return View("Billing");
            }
        }
예제 #28
0
 partial void InsertProductImage(Kona.Linq.Model.ProductImage instance);
예제 #29
0
 partial void DeleteProductImage(Kona.Linq.Model.ProductImage instance);
예제 #30
0
 partial void InsertInventoryRecord(Kona.Linq.Model.InventoryRecord instance);