修改安全月报
This commit is contained in:
@@ -972,5 +972,44 @@ namespace BLL
|
||||
maxId = GetIntValue(str);
|
||||
return maxId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 通过存储过程获取数据
|
||||
/// </summary>
|
||||
/// <param name="storedProcName"></param>
|
||||
/// <returns></returns>
|
||||
public static int RunProcGetHsseKq(string ProjectId,DateTime startTime,DateTime endTime,string UnitId)
|
||||
{
|
||||
string str = "";
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand("SpGetHsseKq", Connection)
|
||||
{
|
||||
CommandTimeout = 0,
|
||||
CommandType = CommandType.StoredProcedure
|
||||
};
|
||||
SqlParameter[] values = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@ProjectId", ProjectId),
|
||||
new SqlParameter("@startTime", startTime.ToString()),
|
||||
new SqlParameter("@endTime", endTime.ToString()),
|
||||
new SqlParameter("@UnitId", UnitId),
|
||||
new SqlParameter("@returnVal", SqlDbType.Int)
|
||||
};
|
||||
command.Parameters.AddRange(values);
|
||||
command.Parameters["@returnVal"].Direction = ParameterDirection.Output;
|
||||
command.ExecuteNonQuery();
|
||||
str = command.Parameters["@returnVal"].Value.ToString();
|
||||
}
|
||||
finally
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
return Convert.ToInt32(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user