예제 #1
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            student.Name    = nameTextBox.Text;
            student.RollNo  = rollTextBox.Text;
            student.Contact = contactTextBox.Text;
            student.Email   = EmailTextBox.Text;

            if (SaveButton.Text.Equals("Update"))
            {
                manager.Update(student, roll);
                displayDataGridView.DataSource = manager.Show();
                SaveButton.Text = "Save";
                nameTextBox.Clear();
                rollTextBox.Clear();
                contactTextBox.Clear();
                EmailTextBox.Clear();
            }
            else
            {
                int isExecuted = manager.Save(student);
                if (isExecuted > 0)
                {
                    nameTextBox.Clear();
                    rollTextBox.Clear();
                    contactTextBox.Clear();
                    EmailTextBox.Clear();
                    displayDataGridView.DataSource = manager.Show();
                }
            }
        }
        public void UserRegistration(string firstName, string lastName, string email, string password, string gender,
                                     string country)
        {
            email = email.Replace("_random", Guid.NewGuid().ToString());
            FirstNameTextBox.SendKeys(firstName);
            LastNameTextBox.SendKeys(lastName);
            EmailTextBox.SendKeys(email);
            PasswordTextBox.SendKeys(password);
            foreach (var genderBtn in GenderRadioButton)
            {
                var genderValue = genderBtn.GetAttribute("value");
                if (genderValue == gender)
                {
                    genderBtn.Click();
                    break;
                }
            }

            var countrySelect = new SelectElement(CountrySelectBox);

            countrySelect.SelectByText(country);


            DriverWait.Until(ExpectedConditions.ElementToBeClickable(SignupButton)).SendKeys(Keys.Enter);
        }
예제 #3
0
 private void RegisterButtonRegistrationWindow_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrWhiteSpace(EmailTextBox.Text))
     {
         MessageBox.Show("Email is not entered!");
         EmailTextBox.Focus();
     }
     else if (!_repo.IsEmailUnique(EmailTextBox.Text))
     {
         MessageBox.Show("User with such email already exists. \nEmail should be unique!");
         return;
     }
     else if (string.IsNullOrWhiteSpace(NameTextBox.Text))
     {
         MessageBox.Show("Full name is not entered!");
         NameTextBox.Focus();
     }
     else if (string.IsNullOrWhiteSpace(PasswordTextBox.Password))
     {
         MessageBox.Show("Password is not entered");
         PasswordTextBox.Focus();
     }
     else
     {
         _repo.CreateNewUser(NameTextBox.Text, EmailTextBox.Text, PasswordTextBox.Password);
         DialogResult = true;
     }
 }
예제 #4
0
        private void newWorkerSubmit_Click(object sender, EventArgs e)
        {
            string newUserBannerId    = BannerTextBox.Text;
            string newUserFirstName   = FirstNameTextBox.Text;
            string newUserLastName    = LastNameTextBox.Text;
            string newUserPhoneNumber = PhoneNumberTextBox.Text;
            string newUserEmail       = EmailTextBox.Text;
            string newUserUserType    = UserTypeTextBox.Text;
            string newUserNotes       = NotesTextBox.Text;
            string newUserStatus      = StatusTextBox.Text;

            User newUser = new User(newUserBannerId, newUserFirstName, newUserLastName, newUserPhoneNumber, newUserEmail, newUserUserType, newUserNotes, newUserStatus);

            newUser.insert();

            BannerTextBox.Clear();
            FirstNameTextBox.Clear();
            LastNameTextBox.Clear();
            PhoneNumberTextBox.Clear();
            EmailTextBox.Clear();
            UserTypeTextBox.Clear();
            NotesTextBox.Clear();
            StatusTextBox.Clear();

            NewWorkerNotificationLabel.Text = "User added to database";
        }
예제 #5
0
파일: Form1.cs 프로젝트: Essisten/Sign-In
 private void LoginButton_Click(object sender, EventArgs e)
 {
     if (registration == true)
     {
         if (LoginTextBox.Text != "" && PasswordTextBox.Text != "" && LastNameTextBox.Text != "" && EmailTextBox.Text != "" && RobotCheckBox.Checked == true && GenderComboBox.SelectedItem != null && BirthDateTimePicker.Value != null)
         {
             Users.Add(new User(LoginTextBox.Text, LastNameTextBox.Text, PasswordTextBox.Text, EmailTextBox.Text, GenderComboBox.SelectedItem, Convert.ToString(BirthDateTimePicker.Value)));
             folderBrowserDialog1.ShowDialog();
             File.AppendAllText(folderBrowserDialog1.SelectedPath + "\\Data.txt", $"Имя: {LoginTextBox.Text}, Фамилия: {LastNameTextBox.Text}, Электронная почта: {PasswordTextBox.Text}, Пароль: {EmailTextBox.Text}, Пол: {GenderComboBox.SelectedItem}, Дата рождения: {BirthDateTimePicker.Value}.\n");
             LoginTextBox.Clear();
             PasswordTextBox.Clear();
             LastNameTextBox.Clear();
             EmailTextBox.Clear();
             RobotCheckBox.Checked       = false;
             GenderComboBox.SelectedItem = "";
             BirthDateTimePicker.Value   = DateTime.Now;
         }
     }
     else
     {
         for (int i = 0; i < Users.Count; i++)
         {
             if (LoginTextBox.Text == User.GetInfo(Users[i], 0) && PasswordTextBox.Text == User.GetInfo(Users[i], 3))
             {
                 Sign sign = new Sign(User.GetInfo(Users[i], 0));
                 sign.TextLabel.Text = "Авторизация прошла успешно!";
                 sign.Show();
                 return;
             }
         }
         Sign form2 = new Sign();
         form2.TextLabel.Text = "Неправильный логин или пароль";
         form2.Show();
     }
 }
예제 #6
0
        private async void SubmitOnClick(object sender, RoutedEventArgs e)
        {
            try
            {
                EmailTextBox.ClearValue(TextBox.BorderBrushProperty);
                PasswordTextBox.ClearValue(TextBox.BorderBrushProperty);


                await ApiClient.Instance.PostLoginAsync(LoginViewModel);

                EventViewModel = await ApiClient.Instance.GetEventsFromBusinessFromJWTAsync();

                PromotionViewModel = await ApiClient.Instance.GetPromotionsFromBusinessFromJWTAsync();

                CreatePromotionNotification();
                CreateEventsNotification();

                Frame.Navigate(typeof(PlacesView));
                this.Frame.BackStack.Clear();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                Notification.Show(5000);
                EmailTextBox.BorderBrush    = new SolidColorBrush(Colors.Red);
                PasswordTextBox.BorderBrush = new SolidColorBrush(Colors.Red);
                LoginViewModel.Email        = "";
            }
        }
예제 #7
0
        private bool CheckEmail()
        {
            Regex mRegxExpression;

            if (EmailTextBox.Text.Trim() != string.Empty)
            {
                mRegxExpression = new Regex(@"^([a-zA-Z0-9_\-])([a-zA-Z0-9_\-\.]*)@(\[((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}|((([a-zA-Z0-9\-]+)\.)+))([a-zA-Z]{2,}|(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\])$");

                if (!mRegxExpression.IsMatch(EmailTextBox.Text.Trim()))
                {
                    ErrorLabel.Visible = true;
                    EmailTextBox.Focus();
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                ErrorLabel2.Visible = true;
                EmailTextBox.Focus();
                return(false);
            }
        }
        private bool Validar()
        {
            bool paso = true;

            if (ClaveTextBox.Text != ConfirmaClaveTextBox.Text)
            {
                MyErrorProvider.SetError(ClaveTextBox, "Los campos Clave y confrimar Clave no pueden ser diferentes");
                MyErrorProvider.SetError(ConfirmaClaveTextBox, "Los campos Clave y confrimar Clave no pueden ser diferentes");

                ClaveTextBox.Clear();
                ConfirmaClaveTextBox.Clear();

                NombreTextBox.Focus();
                paso = false;
            }

            if (NombreTextBox.Text == String.Empty)
            {
                MyErrorProvider.SetError(NombreTextBox, "El Campo nombre no puede estar vacio");
                NombreTextBox.Focus();
                paso = false;
            }

            if (AliasTextBox.Text == String.Empty)
            {
                MyErrorProvider.SetError(AliasTextBox, "El Campo alias no puede estar vacio");
                AliasTextBox.Focus();
                paso = false;
            }

            if (ClaveTextBox.Text == String.Empty)
            {
                MyErrorProvider.SetError(ClaveTextBox, "El Campo Clave no puede estar vacio");
                ClaveTextBox.Focus();
                paso = false;
            }

            if (ConfirmaClaveTextBox.Text == String.Empty)
            {
                MyErrorProvider.SetError(ConfirmaClaveTextBox, "El Campo Confirmar Clave no puede estar vacio");
                ConfirmaClaveTextBox.Focus();
                paso = false;
            }

            if (EmailTextBox.Text == String.Empty)
            {
                MyErrorProvider.SetError(EmailTextBox, "El Campo E-mail Clave no puede estar vacio");
                EmailTextBox.Focus();
                paso = false;
            }

            if (UsuariosBLL.ExisteAlias(AliasTextBox.Text, (int)UsuarioIdNumericUpDown.Value))
            {
                MyErrorProvider.SetError(AliasTextBox, "El Campo alias ya existe");
                AliasTextBox.Focus();
                AliasTextBox.Clear();
                paso = false;
            }
            return(paso);
        }
예제 #9
0
        private void CreateNewAccountDialog_Load(object s, EventArgs ee)
        {
            if (DesignMode)
            {
                return;
            }

            _passwordStrengthMeter.MeterChanged += (sender, e) =>
            {
                _toolTip.SetToolTip(PassphraseTextBox, _passwordStrengthMeter.StrengthTip);
            };

            _viewModel.BindPropertyChanged(nameof(CreateNewAccountViewModel.ShowPassword), (bool show) => { PassphraseTextBox.UseSystemPasswordChar = VerifyPassphraseTextbox.UseSystemPasswordChar = !(ShowPassphraseCheckBox.Checked = show); });
            _viewModel.BindPropertyChanged(nameof(CreateNewAccountViewModel.PasswordText), (string p) => { PassphraseTextBox.Text = p; });
            _viewModel.BindPropertyChanged(nameof(CreateNewAccountViewModel.Verification), (string v) => { VerifyPassphraseTextbox.Text = v; });
            _viewModel.BindPropertyChanged(nameof(CreateNewAccountViewModel.UserEmail), (string u) => { EmailTextBox.Text = u; });

            EmailTextBox.Enabled = EmailTextBox.Text.Length == 0;
            if (EmailTextBox.Enabled)
            {
                EmailTextBox.Focus();
            }
            else
            {
                PassphraseTextBox.Focus();
            }
        }
 private bool IsFormValid()
 {
     if (NameTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Name is required");
         NameTextBox.Clear();
         NameTextBox.Focus();
         return(false);
     }
     if (EmailTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Email is required");
         EmailTextBox.Clear();
         EmailTextBox.Focus();
         return(false);
     }
     if (TelephoneTextBox.Text.Trim() == string.Empty)
     {
         Messages.ShowErrorMessage("Telephone is required");
         TelephoneTextBox.Clear();
         TelephoneTextBox.Focus();
         return(false);
     }
     return(true);
 }
        public ActionResult Extend(int id, EmailTextBox txtBox)
        {
            HttpResponseMessage response = ExtendAnnouncement(id, txtBox.Email);

            if (response.StatusCode == System.Net.HttpStatusCode.OK)
            {
                return(RedirectToAction("List"));
            }
            else if (response.StatusCode == System.Net.HttpStatusCode.Forbidden)
            {
                //ViewBag.Error = "Input data is incorrect!";
                ModelState.AddModelError(string.Empty, "Input data is incorrect!");
            }
            else if (response.StatusCode == System.Net.HttpStatusCode.MethodNotAllowed)
            {
                //ViewBag.Error = "This announcement is closed! Cannot extend!";
                ModelState.AddModelError(string.Empty, "The period allowed for extending has expired!");
            }
            else if (response.StatusCode == System.Net.HttpStatusCode.BadRequest)
            {
                //ViewBag.Error = "This announcement is closed! Cannot extend!";
                ModelState.AddModelError(string.Empty, "This announcement is closed! Cannot extend!");
            }


            return(View());
        }
예제 #12
0
        public bool Validar()
        {
            ErrorProvider.Clear();
            bool paso = true;

            if (string.IsNullOrWhiteSpace(NombreTextBox.Text))
            {
                ErrorProvider.SetError(NombreTextBox, "No nombre no puedes esta en blanco");
                NombreTextBox.Focus();
                paso = false;
            }
            if (TelefonoMaskedTextBox.MaskFull == false)
            {
                ErrorProvider.SetError(TelefonoMaskedTextBox, "Telefono invalido");
                TelefonoMaskedTextBox.Focus();
                paso = false;
            }
            if (RNCMaskedTextBox.MaskFull == false)
            {
                ErrorProvider.SetError(RNCMaskedTextBox, "RNC invalido");
                RNCMaskedTextBox.Focus();
                paso = false;
            }
            if (ValidarEmail(EmailTextBox.Text) == false)
            {
                ErrorProvider.SetError(EmailTextBox, "EmailInvalido");
                EmailTextBox.Focus();
                paso = false;
            }
            return(paso);
        }
예제 #13
0
 //Login to SkillSwap Website
 public void LoginStep(string userName, string password)
 {
     SignInButton.Click();
     EmailTextBox.SendKeys(userName);
     PasswordTextBox.SendKeys(password);
     LoginButton.Click();
 }
예제 #14
0
        private bool Validar()
        {
            bool paso = true;

            ErrorProvider.Clear();
            if (NombreTextBox.Text == string.Empty)
            {
                ErrorProvider.SetError(NombreTextBox, "El Campo nombre no puede estar vacio");
                NombreTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(EmailTextBox.Text))
            {
                ErrorProvider.SetError(EmailTextBox, "el campo email no puede esar vacio");
                EmailTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(UsuarioTextBox.Text))
            {
                ErrorProvider.SetError(UsuarioTextBox, "El campo usuario no puede estar vacia");
                UsuarioTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(ClaveTextBox.Text))
            {
                ErrorProvider.SetError(ClaveTextBox, "Este campo o puede estar vacio");
                ClaveTextBox.Focus();
                paso = false;
            }
            return(paso);
        }
예제 #15
0
 private void resetFormToolStripMenuItem_Click(object sender, EventArgs e)
 {
     NameTextbox.Clear();
     EmailTextBox.Clear();
     MobileTextBox.Clear();
     AddressTextBox.Clear();
 }
예제 #16
0
 private void NombresTextBox_KeyPress(object sender, KeyPressEventArgs e) // Del nombre al Email
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         EmailTextBox.Focus();
     }
 }
예제 #17
0
        /// <summary>
        /// Deletes contact information in the list and ListBox.
        /// </summary>
        private void RemoveContact()
        {
            var selectedIndex = AllContactsListBox.SelectedIndex;

            if (selectedIndex == -1)
            {
                MessageBox.Show("Select a contact from the list", "Warning",
                                MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
                //TODO: если после if-else нет никакой общей логики, тогда в if можно написать return, а else с лишней вложенностью убрать (+)
            }

            DialogResult result = MessageBox.Show("Do you really want to remove this contact?",
                                                  "Remove contact", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (result == DialogResult.OK)
            {
                var selectedContact = _contacts[selectedIndex];
                _project.Contacts.Remove(selectedContact);
                AllContactsListBox.Items.RemoveAt(selectedIndex);
                SurnameTextBox.Clear();
                NameTextBox.Clear();
                PhoneTextBox.Clear();
                EmailTextBox.Clear();
                VkIDTextBox.Clear();
                SaveToFile();
            }
            SortingFoundContacts();
        }
        public ActionResult Close(int id, EmailTextBox txtBox)
        {
            //AnnouncementDetailsModel announcement = GetAnnouncementById(id);
            //if (announcement.Email == txtBox.Email)
            //{
            HttpResponseMessage response = CloseAnnouncement(id, txtBox.Email);

            if (response.StatusCode == System.Net.HttpStatusCode.OK)
            {
                return(RedirectToAction("List"));
            }
            else if (response.StatusCode == System.Net.HttpStatusCode.Forbidden)
            {
                ViewBag.Error = "Input data is incorrect!";
            }
            else if (response.StatusCode == System.Net.HttpStatusCode.BadRequest)
            {
                ViewBag.Error = "This announcement is already closed!";
            }
            //}



            return(View());
        }
예제 #19
0
 private void LoginButtonLoginWindow_Click(object sender, RoutedEventArgs e)
 {
     if (!_repo.AreThereAnyUsers())
     {
         MessageBox.Show("No any user in system! \nPlease, register");
         return;
     }
     if (string.IsNullOrWhiteSpace(EmailTextBox.Text))
     {
         MessageBox.Show("Please, enter email!");
         EmailTextBox.Focus();
         return;
     }
     if (string.IsNullOrWhiteSpace(PasswordTextBox.Password))
     {
         MessageBox.Show("Please, enter password!");
         PasswordTextBox.Focus();
         return;
     }
     if (_repo.AutentificateUser(EmailTextBox.Text, User.GetHash(PasswordTextBox.Password)) == null)
     {
         MessageBox.Show("No such user! \nCheck your credentials or register in the system");
     }
     else
     {
         MainWindow mainWindow = new MainWindow(_repo, _repo.AutentificateUser(EmailTextBox.Text, User.GetHash(PasswordTextBox.Password)));
         mainWindow.Show();
         this.Close();
     }
 }
예제 #20
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            // check if navigated from register, if so already fill in the registered e-mail
            if (e.Parameter is string && !e.Parameter.ToString().Equals(""))
            {
                EmailTextBox.Text    = (string)e.Parameter;
                PasswordBox.Password = "";
                RememberMe.IsChecked = false;
            }
            else
            {
                // automatic login if credential found (remember me was checked previously)
                var credential = GetCredential();
                if (credential != null)
                {
                    credential.RetrievePassword();

                    EmailTextBox.Text    = credential.UserName;
                    PasswordBox.Password = credential.Password;
                    RememberMe.IsChecked = true;

                    AttemptLogin(credential.UserName, credential.Password, true);
                }
            }

            EmailTextBox.Select(EmailTextBox.Text.Length, 0); // move cursor to end of textbox
        }
예제 #21
0
 private void FechaDeIngresoDateTimePicker_KeyPress(object sender, KeyPressEventArgs e) // De la fecha de ingreso al Email
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         EmailTextBox.Focus();
     }
 }
 private void AddContactButtonClick(object sender, RoutedEventArgs e)
 {
     try
     {
         var contact = new Contact
         {
             Email     = EmailTextBox.Text,
             FirstName = FirstNameTextBox.Text,
             LastName  = LastNameTextBox.Text
         };
         MessageService.AddContact(contact);
         StatusBlock.Alert($"Contact {contact.Email} created successfully", StatusBlock.Success);
         EmailTextBox.Clear();
         FirstNameTextBox.Clear();
         LastNameTextBox.Clear();
     }
     catch (ItemAllreadyExistsException ex)
     {
         StatusBlock.Alert(ex.Message, StatusBlock.Danger);
     }
     catch (FormatException ex)
     {
         StatusBlock.Alert(ex.Message, StatusBlock.Warning);
     }
     catch (DbEntityValidationException)
     {
         StatusBlock.Alert("Validation failed for one of the fields", StatusBlock.Danger);
     }
     catch (Exception)
     {
         StatusBlock.Alert("Error while saving to database", StatusBlock.Danger);
     }
 }
예제 #23
0
 public void LoginIntoN11(string username, string password)
 {
     SignInButton.Click();
     EmailTextBox.SendKeys(username);
     PasswordBox.SendKeys(password);
     LoginButton.Click();
 }
예제 #24
0
 private void DireccionTextBox_KeyPress(object sender, KeyPressEventArgs e) // De la direccion al Email
 {
     if ((int)e.KeyChar == (int)Keys.Enter)
     {
         EmailTextBox.Focus();
     }
 }
예제 #25
0
        private bool Validar()
        {
            bool paso = true;

            if (NombreTextBox.Text == string.Empty)
            {
                Errores.SetError(NombreTextBox, "El campo nombre no puede estar vacio");
                NombreTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(RolComboBox.Text))
            {
                Errores.SetError(RolComboBox, "Debe agregar un rol especifico");
                RolComboBox.Focus();
                paso = false;
            }

            if (AliasTextBox.Text == string.Empty)
            {
                Errores.SetError(AliasTextBox, "El campo de alias no puede estar vacio");
                AliasTextBox.Focus();
                paso = false;
            }

            if (ClaveTextBox.Text == string.Empty)
            {
                Errores.SetError(ClaveTextBox, "El campo de clave no puede estar vacio");
                ClaveTextBox.Focus();
                paso = false;
            }

            if (ConfirmClaveTextBox.Text == string.Empty)
            {
                Errores.SetError(ConfirmClaveTextBox, "El campo de confirmar clave no puede estar vacio");
                ConfirmClaveTextBox.Focus();
                paso = false;
            }

            if (EmailTextBox.Text == string.Empty)
            {
                Errores.SetError(EmailTextBox, "El campo de email no puede estar vacio");
                EmailTextBox.Focus();
                paso = false;
            }
            if (UsuarioBLL.ExisteAlias(AliasTextBox.Text))
            {
                Errores.SetError(AliasTextBox, "Este Alias ya existe");
                AliasTextBox.Focus();
                paso = false;
            }
            if (string.Equals(ClaveTextBox.Text, ConfirmClaveTextBox.Text) != true)
            {
                Errores.SetError(ConfirmClaveTextBox, "La clave es distinta");
                ConfirmClaveTextBox.Focus();
                paso = false;
            }

            return(paso);
        }
예제 #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         EmailTextBox.Focus();
     }
 }
예제 #27
0
        protected void SalvarCliente()
        {
            try
            {
                string nome     = NomeTextBox.RequiredField();
                string email    = EmailTextBox.RequiredRegularAddressMail();
                string telefone = TelefoneTextBox.RequiredField();
                string log      = LogradouroTextBox.Text;
                string num      = NumeroTextBox.Text;
                string cep      = CepTextBox.Text;
                string bairro   = BairroTextBox.Text;
                string cidade   = CidadeTextBox.Text;
                string uf       = UfDropDownList.SelectedIndex.ToString();

                //criacao da entidade cliente e atribuição dos campos dps chamar metodo da classe controller

                    << << << < HEAD
                    //Cliente cliente = new Cliente(0, nome, "0000000",,, telefone, email,,);
                    == == == =
                        //    Cliente cliente = new Cliente(0, nome, "0000000",,, telefone, email,,);
                        >> >> >> > c25ee8fd04a6f70d9000d45c2a774dec39978efc


                        MensagemLabel.Text = "Dados Salvos com sucesso";
            }
예제 #28
0
 private void NameTextBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         EmailTextBox.Focus();
         RootScroller.ScrollToVerticalOffset(double.MaxValue);
     }
 }
        private bool Validar()
        {
            bool paso = true;

            if (NombreTextBox.Text == string.Empty)
            {
                MyErrorProvider.SetError(NombreTextBox, "El campo nombre no puede estar vacio");
                NombreTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EmailTextBox.Text))
            {
                MyErrorProvider.SetError(EmailTextBox, "El Email no puede estar vacio");
                EmailTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(AliasTextBox.Text))
            {
                MyErrorProvider.SetError(AliasTextBox, "El campo Alias no puede estar vacio");
                AliasTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(RolComboBox.Text))
            {
                MyErrorProvider.SetError(RolComboBox, "Debe agregar un rol especifico");
                RolComboBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(ClaveTextBox.Text))
            {
                MyErrorProvider.SetError(ClaveTextBox, "Debe asignar una clave a su usuario");
                ClaveTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(ConfirmarClaveTextBox.Text))
            {
                MyErrorProvider.SetError(ConfirmarClaveTextBox, "Debe confirmar la clave");
                ConfirmarClaveTextBox.Focus();
                paso = false;
            }
            if (ClaveTextBox.Text != ConfirmarClaveTextBox.Text)
            {
                MyErrorProvider.SetError(ConfirmarClaveTextBox, "Las contrseñas deben ser iguales.");
                ConfirmarClaveTextBox.Focus();
                MyErrorProvider.SetError(ClaveTextBox, "Las contraseñas deben ser iguales.");
                ClaveTextBox.Focus();
                paso = false;
            }
            if (UsuariosBLL.ExisteAlias(AliasTextBox.Text))
            {
                MyErrorProvider.SetError(AliasTextBox, "Los Alias no pueden repetirse!");
                AliasTextBox.Focus();
                paso = false;
            }

            return(paso);
        }
예제 #30
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            nameTextBox.Clear();

            EmailTextBox.Clear();


            ConfirmTextBox.Clear();
        }