public void bankOwnUpdate(bankOwn bankOwn) { createConnection(); connection.Open(); SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "bankOwnUpdate"; command.Parameters.Add("@code", SqlDbType.Int, 50); command.Parameters["@code"].Value = bankOwn.code; command.Parameters.Add("@accountNumber", SqlDbType.Int, 50); command.Parameters["@accountNumber"].Value = bankOwn.accountNumber; command.Parameters.Add("@bankName", SqlDbType.NVarChar, 50); command.Parameters["@bankName"].Value = bankOwn.bankName; command.Parameters.Add("@officeName", SqlDbType.NVarChar, 50); command.Parameters["@officeName"].Value = bankOwn.officeName; command.Parameters.Add("@officeCode", SqlDbType.Int, 50); command.Parameters["@officeCode"].Value = bankOwn.officeCode; command.Parameters.Add("@moneyy", SqlDbType.NVarChar, 10); command.Parameters["@moneyy"].Value = bankOwn.money; command.Parameters.Add("@total", SqlDbType.Money, 50); command.Parameters["@total"].Value = bankOwn.total; command.Parameters.Add("@bankInfoCode", SqlDbType.Int, 50); command.Parameters["@bankInfoCode"].Value = bankOwn.bankInfoCode; command.ExecuteNonQuery(); connection.Close(); connection.Dispose(); }