コード例 #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);
     }
 }