public static RegistrationResponse Register(string login, string password, string email, string imgName) { SkypeDataClassesDataContext sdc = new SkypeDataClassesDataContext(); int returnedValue = sdc.SP_Register(login, email, password, imgName); RegistrationResponse registrationResponse = new RegistrationResponse(); if (returnedValue == 1) { registrationResponse.HasError = false; return registrationResponse; } registrationResponse.HasError = true; registrationResponse.LoginError = "Already Exists!"; return registrationResponse; }
public void ProcessRegistrationResponse(RegistrationResponse registrationResponse) { if (registrationResponse.HasError == true) { LoginErrorMessage = registrationResponse.LoginError; MessageBox.Show("Error"); MessageBox.Show(registrationResponse.LoginError); } else { MessageBox.Show("Done!"); _closeWindow(RegistrationDialogResult.Registered); } }