//public ActionResult AddCategory(CategoryModel model)
 //{
 //    var effectedRow = new CategoryBLL().addCategory(model.totblCategory());
 //    return Content("" + effectedRow);
 //}
 public ActionResult Add(long? parent, string name)
 {
     var category = new tblCategory();
     category.parent = parent;
     category.name = name;
     int effected = new CategoryBLL().addCategory(category);
     return Content("" + effected);
 }
        public ActionResult Update(int id, int parent, string name)
        {
            var category = new tblCategory();
            category.id = id;
            category.parent = parent;
            category.name = name;

            var effectedRow = new CategoryBLL().UpdateCategory(category);
            return Content("" + effectedRow);
        }
Exemplo n.º 3
0
 public int UpdateCategory(tblCategory category)
 {
     return categoryDAL.UpdateCategory(category);
 }
Exemplo n.º 4
0
 public int deleteCategory(tblCategory category)
 {
     return categoryDAL.deleteCategory(category);
 }
Exemplo n.º 5
0
 public int addCategory(tblCategory category)
 {
     return categoryDAL.addCategory(category);
 }