Esempio n. 1
0
        private void buttonEntrar_Click(object sender, EventArgs e)
        {
            String dni      = textBoxUser.Text.ToString();
            String password = textBoxPassword.Text.ToString();

            if (dni.Trim().Equals("") || password.Trim().Equals(""))
            {
                MessageBox.Show(Strings.partnerPasswordEmpty, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                OC.Core.Crypto.Hash hash = new OC.Core.Crypto.Hash();
                String  clave            = hash.Sha512(password);
                Boolean correcto         = true;
                socioLogin = SocioORM.LoginSocio(dni, clave, ref correcto);
                if (socioLogin != null)
                {
                    cerradoPropio = true;
                    this.Close();
                }
                else if (correcto)
                {
                    MessageBox.Show(Strings.wrongCredentials, Strings.warning, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }