I'm surprised there isn't any errors because you specified the wrong stored procedure name and variable name.
In the code you have "StoredProcedure" and "@GlobalNumberID".
Yet, the storeprocedure is defined as:
Also, 'using' blocks help with immediately cleaning up resources (which is very important when working with databases).
ALTER PROCEDURE StoredProcedure1
Rewriting the code to use using blocks looks like:
The using blocks free up the SqlConnection and SqlCommand objects right at the closing braces.
using( var cn = new SqlConnection( ... ) )
using( var cmd = cn.CreateCommand() )
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "StoredProcedure1";
cmd.Parameters.AddWithValue( "@GNumber ", Convert.ToInt64(textBox1.Text) );
You might also notice I've called AddWithValue for the sproc variable. This method is smart enough to realize the value is an Int64.