自主管理加分项
This commit is contained in:
@@ -199,6 +199,60 @@ namespace BLL
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断文件类型是否支持的预览
|
||||
/// </summary>
|
||||
/// <param name="FiletExtension"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsSupportFileType(string FiletExtension)
|
||||
{
|
||||
bool result = false;
|
||||
List<String> list = new List<string>();
|
||||
list.Add(".doc");
|
||||
list.Add(".docx");
|
||||
list.Add(".pdf");
|
||||
list.Add(".txt");
|
||||
list.Add(".xlsx");
|
||||
list.Add(".xls");
|
||||
list.Add(".png");
|
||||
list.Add(".jpg");
|
||||
list.Add(".jpeg");
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == FiletExtension)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断文件类型是否是图片
|
||||
/// </summary>
|
||||
/// <param name="FiletExtension"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsImage(string FiletExtension)
|
||||
{
|
||||
bool result = false;
|
||||
List<String> list = new List<string>();
|
||||
list.Add(".png");
|
||||
list.Add(".jpg");
|
||||
list.Add(".jpeg");
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == FiletExtension)
|
||||
{
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user