Esempio n. 1
0
        // if any error db will return 1
        internal bool RegisterUser(User user)
        {
            try
            {
                command = database.GetStoredProcCommand("sp_SetUser");

                database.AddInParameter(command, "@ID", SqlDbType.Int, user.Id);
                database.AddInParameter(command, "@Name", SqlDbType.NVarChar, user.Name);
                database.AddInParameter(command, "@Surname", SqlDbType.NVarChar, user.SurName);
                database.AddInParameter(command, "@Username", SqlDbType.NVarChar, user.UserName);
                database.AddInParameter(command, "@Password", SqlDbType.NVarChar, user.Password);
                database.AddInParameter(command, "@ProfilePicture", SqlDbType.NVarChar, user.ProfilePicture);
                database.ExecuteScalar(command);
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
Esempio n. 2
0
 public static bool Register(User user)
 {
     return mUserLogic.RegisterUser(user);
 }
Esempio n. 3
0
 public bool Register(User user)
 {
     return User.Register(user);
 }