public static void CreateFile(FileItem f) { f.insert(); int count = FileItem.count("CategoryId=" + f.CategoryId); FileCategory c = FileCategory.GetById(f.CategoryId); c.DataCount = count; c.update(); }
public static void DeleteFile(FileItem f) { int categoryId = f.CategoryId; f.delete(); int count = FileItem.count("CategoryId=" + categoryId); FileCategory c = FileCategory.GetById(categoryId); c.DataCount = count; c.update(); }