示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string        senha       = "";
            SqlConnection conexaodbrr = new SqlConnection();

            conexaodbrr.ConnectionString = Properties.Settings.Default.conexaosen;
            try
            {
                conexaodbrr.Open();
                SqlCommand codigoSQL = new SqlCommand();
                codigoSQL.CommandText = "SELECT SenhaUsu FROM tbLOGIN" +
                                        "  Where LoginUsu= '" + textBox1.Text +
                                        "'and SenhaUsu = '" + textBox2.Text + "'";

                codigoSQL.CommandType = CommandType.Text;
                codigoSQL.Connection  = conexaodbrr;
                SqlDataReader retorno;
                retorno = codigoSQL.ExecuteReader();
                retorno.Read();
                senha = retorno.GetString(0);
                conexaodbrr.Close();
                FrmMenu FrmMenu = new FrmMenu();
                FrmMenu.Show();
                this.Hide();
            }catch (Exception) {
                MessageBox.Show("Falha na conexão com o banco de dados");
                textBox1.Focus();
                textBox1.Clear();
                textBox2.Clear();
                return;
            }
        }
示例#2
0
 /// <summary>
 /// Constructeur de la classe
 /// </summary>
 /// <param name="myParent">myParent, fenêtre principale de l'application</param>
 public PanelMdpOublie(FrmMenu myParent)
 {
     this.lblMail = new Label();
     this.txtMail = new TextBox();
     this.btnValidate = new Button();
     this.lblErr = new Label();
     this.myParent = myParent;
     this.SuspendLayout();
     initComponents();
 }
示例#3
0
 /// <summary>
 /// Constructeur de la classe
 /// </summary>
 /// <param name="myParent">myParent, fenêtre principale de l'application</param>
 public PanelConnexion(FrmMenu myParent)
 {
     this.myParent = myParent;
     this.lblErr = new Label();
     this.btnCnx = new Button();
     this.txtPw = new TextBox();
     this.txtMail = new TextBox();
     this.lblPw = new Label();
     this.lblMail = new Label();
     this.SuspendLayout();
     initComponents();
 }
示例#4
0
 /// <summary>
 /// Constructeur de la classe
 /// </summary>
 /// <param name="myParent">myParent, fenêtre principale de l'application</param>
 public PanelCreerTicket(FrmMenu myParent)
 {
     this.lblTitre = new Label();
     this.txtNom = new TextBox();
     this.lblNom = new Label();
     this.lblContenu = new Label();
     this.lblDate = new Label();
     this.lblCat = new Label();
     this.rtxtContenu = new RichTextBox();
     this.btnValider = new Button();
     this.dTPDate = new DateTimePicker();
     this.lblPrio = new Label();
     this.listPrio = new ListBox();
     this.listCat = new ListBox();
     this.lblErr = new Label();
     this.myParent = myParent;
     this.myTicket = new Ticket();
     this.SuspendLayout();
     initComponents();
 }
示例#5
0
 /// <summary>
 /// Constructeur de la classe PanelProfil
 /// </summary>
 /// <param name="myParent">myParent, fenêtre principale de l'application</param>
 public PanelProfil(FrmMenu myParent)
 {
     this.lblErr = new Label();
     this.lblErr2 = new Label();
     this.txtCurrentPw = new TextBox();
     this.lblCurrentPw = new Label();
     this.txtNewPwC = new TextBox();
     this.txtNewPw = new TextBox();
     this.txtMail = new TextBox();
     this.txtLastname = new TextBox();
     this.lblNewPwC = new Label();
     this.lblNewPw = new Label();
     this.lblMail = new Label();
     this.lblLastname = new Label();
     this.lblSurname = new Label();
     this.txtSurname = new TextBox();
     this.myParent = myParent;
     this.btnChgPw = new Button();
     this.SuspendLayout();
     initComponents();
 }
示例#6
0
 private void btnModificar_Click(object sender, EventArgs e)
 {
     if (txtUsuario.Text.Equals(string.Empty) || txtCont.Text.Equals(string.Empty))
     {
         MessageBox.Show("debes introducir tu usuario y contraseña");
     }
     else
     {
         if (validacion.validarUsuario(txtUsuario.Text) == false)
         {
             MessageBox.Show("El nombre de usuario debe contener solo letras y numeros");
         }
         else
         {
             if (validacion.validarContrasena(txtCont.Text) == false)
             {
                 MessageBox.Show("contraseña no valida");
             }
             else
             {
                 usuario usrActual = new usuario(txtUsuario.Text.ToString(), txtCont.Text.ToString());
                 if (usrActual.verificaUsuario())
                 {
                     MessageBox.Show("Bienvenido");
                     FrmMenu fm = new FrmMenu();
                     fm.Show();
                     this.Hide();
                 }
                 else
                 {
                     MessageBox.Show("Usuario y/o Contraseña Incorrectos");
                 }
             }
         }
     }
 }
示例#7
0
 private void btnModificar_Click(object sender, EventArgs e)
 {
     if (txtUsuario.Text.Equals(string.Empty) || txtCont.Text.Equals(string.Empty))
     {
         MessageBox.Show("debes introducir tu usuario y contraseña");
     }
     else
     {
         if (validacion.validarUsuario(txtUsuario.Text) == false)
         {
             MessageBox.Show("El nombre de usuario debe contener solo letras y numeros");
         }
         else
         {
             if (validacion.validarContrasena(txtCont.Text) == false)
             {
                 MessageBox.Show("contraseña no valida");
             }
             else
             {
                 usuario usrActual = new usuario(txtUsuario.Text.ToString(), txtCont.Text.ToString());
                 if (usrActual.verificaUsuario())
                 {
                     MessageBox.Show("Bienvenido");
                     FrmMenu fm = new FrmMenu();
                     fm.Show();
                     this.Hide();
                 }
                 else
                 {
                     MessageBox.Show("Usuario y/o Contraseña Incorrectos");
                 }
             }
         }
     }
 }
示例#8
0
        private void billingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmMenu f = new FrmMenu();

            f.ShowDialog();
        }
示例#9
0
        private void BtnMenu_Click(object sender, EventArgs e)
        {
            FrmMenu f = new FrmMenu();

            f.ShowDialog();
        }