添加调用存储过程的时间,进行处理,发布正式库或者发布线上的时候进行测试及时处理、
/// <summary> /// 执行存储过程,并返回数据集 /// </summary> /// <param name="ProcName">存储过程名</param> /// <param name="Paras">参数集</param> /// <returns>存储过程中返回的数据集</returns> public DataSet RunProSel(string ProcName, SqlParameter[] Paras) { ConOpen(); DataSet ds = new DataSet(); try { SqlDataAdapter Sda = new SqlDataAdapter(); SqlCommand com = new SqlCommand(ProcName, con); com.CommandTimeout = 10000; com.CommandType = CommandType.StoredProcedure; if (Paras != null) { foreach (SqlParameter Para in Paras) { com.Parameters.Add(Para); } } Sda.SelectCommand = com; //Sda.SelectCommand.ExecuteNonQuery(); Sda.Fill(ds, "T"); } catch (Exception ex) { throw ex; } finally { ConClose(); } return ds; }