public string UploadFile(string userID)
{
Byte[] MeaningFile;
FileStream stream = new FileStream(, , );
int size = Convert.ToInt32();
MeaningFile = new Byte[size];
(MeaningFile, 0, size);
();
FileStream fos = null;
string fileName = "";
string fileExt = (("."));
if (fileExt == ".xls")//必须是EXCEL文件
{
try
{
string filePath = ("~/DataFile/");
if (!(filePath))
{
(filePath);
}
fileName = userID + fileExt;
fos = new FileStream(filePath + fileName, , );
(MeaningFile, 0, );
();
}
catch
{
}
finally
{
if (fos != null)
{
try
{
();
}
catch
{
}
}
}
}
else
{
}
return fileName;
}