Esempio n. 1
0
        //
        // GET: /Cms/Article/Create

        public ActionResult Create()
        {
            var classlList = this.BasisDataService.GetClassificationList(new ClassificationRequest());
            //this.ViewBag.Tags = this.CmsService.GetTagList(new TagRequest() { Top = 20, Orderby = Orderby.Hits });
            var model = new Supplier();
            ViewData.Add("material", new SelectList(classlList, "ID", "Name", ""));
            return View("Edit", model);
        }
Esempio n. 2
0
 public void SaveSupplier(Supplier supplier)
 {
     using (var dbContext = new BasisDataDbContext())
     {
         if (supplier.ID > 0)
         {
             dbContext.Update<Supplier>(supplier);
         }
         else
         {
             dbContext.Insert<Supplier>(supplier);
         }
     }
 }
Esempio n. 3
0
 public ActionResult Create(FormCollection collection)
 {
     var model = new Supplier();
     this.TryUpdateModel<Supplier>(model);
     this.BasisDataService.SaveSupplier(model);
     return this.RefreshParent();
 }