예제 #1
0
파일: UserDAO.cs 프로젝트: Dmitriy91/skype
        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;
        }
예제 #2
0
 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);
     }
 }