Esempio n. 1
0
 public static void UpdateCategory(DevCategory category)
 {
     using (var db = DbHelper.Create())
     {
         db.UpdateEntity(category);
     }
 }
Esempio n. 2
0
 public static void InsertCategory(DevCategory category)
 {
     using (var db = DbHelper.Create())
     {
         db.InsertEntity(category);
     }
 }
Esempio n. 3
0
 public static void UpdateCategoryName(DevCategory category)
 {
     string sql = @"UPDATE [dbo].[DevCategory] SET CategoryName=@CategoryName, MainTable=@MainTable WHERE CategoryId=@CategoryId";
     using (var db = DbHelper.Create())
     {
         db.Execute(sql, category);
     }
 }
Esempio n. 4
0
 public static void DeleteCategory(DevCategory category)
 {
     string sql = @"UPDATE[dbo].[DevCategory] SET Deleted = 1 WHERE CategoryId = @CategoryId";
     using (var db = DbHelper.Create())
     {
         db.Execute(sql, category);
     }
 }
Esempio n. 5
0
 public string UpdateCategoryName(DevCategory category)
 {
     DevCategoryBusiness.UpdateCategoryName(category);
     return "";
 }
Esempio n. 6
0
 public JsonResult InsertCategory(DevCategory category)
 {
     DevCategoryBusiness.InsertCategory(category);
     return Json(category);
 }
Esempio n. 7
0
 public string DeleteCategory(DevCategory category)
 {
     category.Deleted = true;
     DevCategoryBusiness.DeleteCategory(category);
     return "";
 }