Browser.mod.DB.LoadSameReport C# (CSharp) Метод

LoadSameReport() публичный статический Метод

public static LoadSameReport ( int callstack_uid, ForEachCallstack func ) : bool
callstack_uid int
func ForEachCallstack
Результат bool
        public static bool LoadSameReport(int callstack_uid, ForEachCallstack func)
        {
            using (SqlConnection conn = new SqlConnection(connectionString))
            {
                try
                {
                    conn.Open();

                    SqlCommand cmd1 = new SqlCommand("usp_select_report_by_callstack_uid", conn);
                    cmd1.CommandType = CommandType.StoredProcedure;

                    cmd1.Parameters.AddWithValue("@callstack_uid", callstack_uid);

                    SqlDataReader reader = cmd1.ExecuteReader();

                    while (reader.Read())
                    {
                        DelegateReport(reader, func);
                    }

                    reader.Close();
                }
                catch (System.Exception)
                {
                    return false;
                }
            }

            return true;
        }