Esempio n. 1
0
 void LimpiarErrores()
 {
     ErrorPro.SetError(txtID, "");
     ErrorPro.SetError(txtNombre, "");
     ErrorPro.SetError(txtApellidos, "");
     ErrorPro.SetError(txtTelefono, "");
 }
Esempio n. 2
0
        private bool ValidarCampos()
        {
            bool Valido = true;

            if (txtID.Text == "")
            {
                Valido = false;
                ErrorPro.SetError(txtID, "Debe ingresar un ID!");
            }
            if (txtNombre.Text == "")
            {
                Valido = false;
                ErrorPro.SetError(txtNombre, "Debe Ingrear un Nombre!");
            }
            if (txtApellidos.Text == "")
            {
                Valido = false;
                ErrorPro.SetError(txtApellidos, "Debe Ingrear un Apellido!");
            }
            if (txtTelefono.Text == "")
            {
                Valido = false;
                ErrorPro.SetError(txtTelefono, "Debe Ingrear un Telefono!");
            }

            return(Valido);
        }
Esempio n. 3
0
        private void cmd_signin_Click(object sender, EventArgs e)
        {
            if (txt_pass.Text.Trim() == "")
            {
                ErrorPro.SetError(txt_pass, "please check your password!");
            }
            else
            {
                ErrorPro.Clear();
            }
            if (txt_User.Text.Trim() == "")
            {
                ErrorPro.SetError(txt_pass, "please check your user name!");
            }
            else
            {
                ErrorPro.Clear();
            }
            string sql = "select * from Account where password='******' and email='" + txt_User.Text.Trim() + "' ";

            try
            {
                if (_client.CheckSignin(sql))
                {
                    GlobalVarible._Account = _client.GetID(sql);

                    this.Close();
                }
                else
                {
                    MessageBox.Show(sql);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }