public static int InsertFileInfo(FileInfo entity) { if (string.IsNullOrEmpty(entity.FileRelativePath)) { return(0); } entity.Priority = 0; CheckFileInfo(entity, true); if (entity.IsSingle) {//删除之前上传的文件 CommonDA.DeleteFileInfo(entity.MasterType.Value, entity.MasterID, entity.CategoryName); } return(CommonDA.InsertFileInfo(entity)); }
public static void DeleteFileInfo(FileMasterType type, int masterID, string categoryName) { CommonDA.DeleteFileInfo(type, masterID, categoryName); }