Example #1
0
 public void Save(Category category)
 {
     if (category.id > 0)
         _categoryDao.Update(category);
     else
         _categoryDao.Insert(category);
 }
Example #2
0
 public ActionResult Qiye(Category category)
 {
     CategoryService.GetInstance().Save(category);
     return Redirect("/admin/qiye?cid="+category.id);
 }
Example #3
0
 public ActionResult Category(string id,string cname)
 {
     Category category = new Category();
     category.pid = int.Parse(id);
     category.name = cname;
     CategoryService.GetInstance().Save(category);
     return Content("添加成功");
 }
Example #4
0
 public ActionResult Categories(Category category)
 {
     int iid = 0;
     int.TryParse(Request.Form["iid"] == null ? "0" : Request.Form["iid"].ToString(), out iid);
     category.id = iid;
     CategoryService.GetInstance().Save(category);
     return Redirect("/admin/categories?id=4");
 }
Example #5
0
 partial void DeleteCategory(Category instance);
Example #6
0
 partial void UpdateCategory(Category instance);
Example #7
0
 partial void InsertCategory(Category instance);
Example #8
0
		private void detach_Category2(Category entity)
		{
			this.SendPropertyChanging();
			entity.category1 = null;
		}
Example #9
0
		private void attach_Category2(Category entity)
		{
			this.SendPropertyChanging();
			entity.category1 = this;
		}