Browser.mod.DB.InsertCallstackComment C# (CSharp) Method

InsertCallstackComment() public static method

public static InsertCallstackComment ( int callstack_uid, string author, string comment ) : bool
callstack_uid int
author string
comment string
return bool
        public static bool InsertCallstackComment(int callstack_uid, string author, string comment)
        {
            using (SqlConnection conn = new SqlConnection(connectionString))
            {
                try
                {
                    conn.Open();

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

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

                    cmd1.ExecuteNonQuery();
                }
                catch (System.Exception)
                {
                    return false;
                }
            }

            return true;
        }