title: Deleting a Record in a Form by C#
body: <p>I want to write a code with Stored Procedure in C# that when the record is found and when clicking on delete button, the record will be deleted.</p>
  
  <p>I had put this Code in <em>SellerDelete</em> Form:</p>
  
  <pre><code>Model.DB_EstateTBEntities Obj_DB = new Model.DB_EstateTBEntities();
  int GridVWID;
  
  private void pictureBox1_Click(object sender, EventArgs e)
  {
      // Delete Button:
      Obj_DB.Sp_DelByIDSeller(GridVWID);
      int Cnt3 = Obj_DB.SaveChanges();
      MessageBox.Show(" You are Deleting {0} rows!! " + Cnt3);
      dataGridView1.DataSource = Obj_DB.Tbl_SellerInfo.ToList();
   }
  </code></pre>
  
  <p><br>
  What should I do?</p>
  
  <p>The Error:</p>
  
  <blockquote>
    <p>(field) int Frm_SellerDelete.GridVWID</p>
    
    <p>Argument 1: Cannot convert from 'int' to 'System.Data.Entity.Core.Objects.ObjectParameter'</p>
    
    <p>Show Potential fixes (Ctrl+.)</p>
  </blockquote>
  
  <p>The <em>Stored Procedure</em> query:</p>
  
  <pre><code>create procedure Sp_DelByIDSeller 
  (@ID int out)
  as
  begin
  delete from Tbl_SellerInfo where ID=@ID
  end
  </code></pre>