Dim cmd As New SqlCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "sp_customer_addupdate"
cmd.Parameters.Add("@customer_id", SqlDbType.BigInt, 0).Value = hdnId.Value
cmd.Parameters("@customer_id").Direction = ParameterDirection.InputOutput
cmd.Parameters.Add("@customer_name", SqlDbType.VarChar, 50).Value = txtLastName.Text & " " & txtFirstName.Text
cmd.Parameters.Add("@description", SqlDbType.VarChar, 50, 50).Value = txtDescription.Text
cmd.Parameters.Add("@address_1", SqlDbType.VarChar, 50).Value = txtAddr1.Text
cmd.Parameters.Add("@address_2", SqlDbType.VarChar, 50).Value = txtAddr2.Text
cmd.Parameters.Add("@city", SqlDbType.VarChar, 50).Value = txtCity.Text
cmd.Parameters.Add("@state", SqlDbType.VarChar, 50).Value = txtState.Text
cmd.Parameters.Add("@country", SqlDbType.VarChar, 50).Value = ddl_country.SelectedValue
cmd.Parameters.Add("@zip", SqlDbType.VarChar, 50).Value = txtZip.Text
cmd.Parameters.Add("@isdcode", SqlDbType.VarChar, 20).Value = txtisdcode.Text
cmd.Parameters.Add("@phone", SqlDbType.VarChar, 50).Value = txtPhone.Text
cmd.Parameters.Add("@created_id", SqlDbType.BigInt, 0).Value = Convert.ToInt64(dt.Rows(0)("user_id").ToString())
cmd.Parameters.Add("@last_update_id", SqlDbType.BigInt, 0).Value = Convert.ToInt64(dt.Rows(0)("user_id").ToString())
DataConnect.GetInstance.ExecuteNonQuery(cmd)
No comments:
Post a Comment