コード例 #1
0
        public UserDao UpdateById(int id, string email, string password,
                                  string firstName, string lastName,
                                  DateTime dateOfBirth, string gender,
                                  string phoneNumber, string address,
                                  int postCode, string city, string country,
                                  string membershipId, bool subscription,
                                  string interestedIn, string roleName)
        {
            ObjectResult <sp_user_save_Result> spOutput =
                entities.sp_user_save(email, password, firstName, lastName,
                                      dateOfBirth, gender, phoneNumber, address,
                                      postCode, city, country, membershipId,
                                      subscription, interestedIn, roleName);

            sp_user_save_Result output = spOutput.First();

            if (output.type.Equals("Error"))
            {
                return(null);
            }

            return(new UserDao(output.id, output.email,
                               output.first_name, output.last_name,
                               output.date_of_birth, output.gender,
                               output.phone_number, output.address,
                               output.post_code, output.city, output.country,
                               output.membership_id, output.subscription,
                               output.interested_in, output.role_fk, roleName));
        }
コード例 #2
0
        public string SignUp(string email, string password, string first_name, string last_name,
                             DateTime date_of_birth, string gender, string phone_number, string address, int post_code, string city,
                             string country, bool subscription, string interested_in, string roleName)
        {
            ObjectResult <sp_user_save_Result>
            result = entities.sp_user_save(email,
                                           password,
                                           first_name,
                                           last_name,
                                           date_of_birth,
                                           gender,
                                           phone_number,
                                           address,
                                           post_code,
                                           city,
                                           country,
                                           null,
                                           subscription,
                                           interested_in,
                                           roleName);

            sp_user_save_Result messageResult = result.First();

            return(messageResult.type + ' ' + messageResult.message);
        }