Metziop

Untitled

Jul 27th, 2022
1,008
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.06 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Ubar4
  12. {
  13.     public partial class Registro : Form
  14.     {
  15.         public Registro()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void Registro_Load(object sender, EventArgs e)
  21.         {
  22.  
  23.         }
  24.  
  25.         private void button1_Click(object sender, EventArgs e)
  26.         {
  27.             string username=userTxt.Text.Trim();
  28.  
  29.             bool duplicado=Datos.datosUsuario.Verificacion(username);
  30.             if (duplicado == false)
  31.             {
  32.                 Datos.datosUsuario.RegistrarUsuario(username);
  33.             }
  34.             else { MessageBox.Show("El usuario ya existe, favor de seleccionar un nuevo nombre de usuario, o logearse con el "); }
  35.  
  36.            
  37.             this.Close();
  38.  
  39.  
  40.         }
  41.  
  42.         private void Registro_Load_1(object sender, EventArgs e)
  43.         {
  44.  
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment