예제 #1
0
        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();
        }
예제 #2
0
        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();
        }