日期:2014-05-17 浏览次数:20631 次
public List<GraduateFileLook> SearchGraduateFile(string FileName, string UploadClassification)
{
SqlParameter[] parameter = {
new SqlParameter("@FileName", SqlDbType.NVarChar,50),
new SqlParameter("@UploadClassification", SqlDbType.NVarChar,50)
};
parameter[0].Value = FileName;
parameter[1].Value = UploadClassification;
string sql = @"SELECT GraduateFileUpload.FileName,GraduateFileUpload.UploadClassification,GraduateFileUpload.Remark
FROM GraduateFileUpload WHERE GraduateFileUpload.FileName = @FileName AND GraduateFileUpload.UploadClassification = @UploadClassification";
List<GraduateFileLook> GraduateFileLookList = new List<GraduateFileLook>();
using (SqlDataReader gfl = SqlHelper.ExecuteReader(SqlHelper.ConnectionString, CommandType.Text, sql, null))
{
while (gfl.Read())
{
GraduateFileLook GraduateFileLook = new GraduateFileLook
{
FileName = gfl["FileName"].ToString(),
UploadClassification = gfl["UploadClassification"].ToString(),
Remark = gfl["Remark"].ToString()
};
GraduateFileLookList.Add(GraduateFileLook);
}
gfl.Close();
}
return GraduateFileLookList;
}