Exemple #1
0
        public void RegisterInNewsLetter(RegisterInNewsLetter model)
        {
            SqlCommand sqlCommand = new SqlCommand();

            sqlCommand = connection.CreateCommand("[dbo].[RegisterInNewsLetter]", CommandType.StoredProcedure);
            sqlCommand.Parameters.AddWithValue("@UserName", model.UserName);
            sqlCommand.Parameters.AddWithValue("@Password", model.Password);
            sqlCommand.Parameters.AddWithValue("@PhoneNumber", model.PhoneNumber);
            sqlCommand.Parameters.AddWithValue("@Email", model.Email);
            sqlCommand.Parameters.AddWithValue("@UserType", model.UserType);
            sqlCommand.Parameters.AddWithValue("@Intrests", model.Intrests);
            sqlCommand.Parameters.AddWithValue("@NotificationType", model.NotificationType);
            sqlCommand.ExecuteNonQuery();
            sqlCommand.Dispose();
        }
Exemple #2
0
 public ActionResult RegisterInNewsLetter(RegisterInNewsLetter model)
 {
     database.RegisterInNewsLetter(model);
     return(Json(""));
 }