Beispiel #1
0
 public abstract bool UpdateCategory(CategoryDetails category);
Beispiel #2
0
 public abstract int InsertCategory(CategoryDetails category);
 /// <summary>
 /// Returns a Category object filled with the data taken from the input CategoryDetails
 /// </summary>
 private static Category GetCategoryFromCategoryDetails(CategoryDetails record)
 {
     if (record == null)
     return null;
      else
      {
     return new Category(record.ID, record.AddedDate, record.AddedBy,
        record.Title, record.Importance, record.Description, record.ImageUrl);
      }
 }
 /// <summary>
 /// Updates an existing category
 /// </summary>
 public static bool UpdateCategory(int id, string title, int importance, string description, string imageUrl)
 {
     CategoryDetails record = new CategoryDetails(id, DateTime.Now, "", title, importance, description, imageUrl);
      bool ret = SiteProvider.Articles.UpdateCategory(record);
      BizObject.PurgeCacheItems("articles_categor");
      return ret;
 }
 /// <summary>
 /// Creates a new category
 /// </summary>
 public static int InsertCategory(string title, int importance, string description, string imageUrl)
 {
     CategoryDetails record = new CategoryDetails(0, DateTime.Now,
     BizObject.CurrentUserName, title, importance, description, imageUrl);
      int ret = SiteProvider.Articles.InsertCategory(record);
      BizObject.PurgeCacheItems("articles_categor");
      return ret;
 }
 public abstract bool UpdateCategory(CategoryDetails category);
 public abstract int InsertCategory(CategoryDetails category);