title: C# WPF Update/Delete buttons do not work
body: <p>I have an assignment to do Insert, Update and Delete operations in Northwind database upon Customers category. I managed to do the insert part and thought it's all done, as the code is supposed to be similar, but... I wrote Update by basically copying Insert and just changing the reference to stored procedure, but when I press the button, nothing happens. Code :</p>
  
  <pre><code>        private void buttonUpdate_Click(object sender, RoutedEventArgs e)
      {
          SqlConnection cn = new SqlConnection(@"Integrated Security=SSPI;Initial Catalog=Northwind;Data Source=(local)");
          SqlCommand cmd = new SqlCommand("UpdateCustomer", cn);
          cmd.CommandType = CommandType.StoredProcedure;
  
          cmd.Parameters.AddWithValue("@CustomerID", "");
          cmd.Parameters.AddWithValue("@CompanyName", companyName);
          cmd.Parameters.AddWithValue("@ContactName", contactName);
          cmd.Parameters.AddWithValue("@ContactTitle", contactTitle);
          cmd.Parameters.AddWithValue("@Address", address);
          cmd.Parameters.AddWithValue("@City", city);
          cmd.Parameters.AddWithValue("@PostalCode", zip);
          cmd.Parameters.AddWithValue("@Phone", phone);
  
          cmd.Parameters.AddWithValue("@Region", "");
          cmd.Parameters.AddWithValue("@Country", "");
          cmd.Parameters.AddWithValue("@Fax", "");
  
          cn.Open();
          cmd.ExecuteNonQuery();
          cn.Close();
      }
  </code></pre>
  
  <p>and my stored procedure for that was taken from MSDN :</p>
  
  <pre><code> CREATE PROCEDURE [dbo].[UpdateCustomer]
      @CustomerID nchar(5),
      @CompanyName nvarchar(40),
      @ContactName nvarchar(30),
      @ContactTitle nvarchar(30),
      @Address nvarchar(60),
      @City nvarchar(15),
      @Region nvarchar(15),
      @PostalCode nvarchar(10),
      @Country nvarchar(15),
      @Phone nvarchar(24),
      @Fax nvarchar(24)
  AS
  UPDATE [dbo].[Customers]
     SET [CompanyName] = @CompanyName
        ,[ContactName] = @ContactName
        ,[ContactTitle] = @ContactTitle
        ,[Address] = @Address
        ,[City] = @City
        ,[Region] = @Region
        ,[PostalCode] = @PostalCode
        ,[Country] = @Country
        ,[Phone] = @Phone
        ,[Fax] = @Fax
   WHERE CustomerID=@CustomerID
  </code></pre>
  
  <p>but nothing changes. What am I doing wrong?
  Also, do I need to do something with cascades in order to delete Customer, as those tables are sort of combined.</p>
  
  <p>It's a basic project and I don't know any DataSets and stuff, so after searching 1000 websites I still cannot figure this one out.. :( Any help will be appreciated!</p>