Пример #1
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form f = new YourOwnWorkshop();

            f.Show();
        }
Пример #2
0
        private void btnSalir_Click(object sender, EventArgs e)
        {
            Form yow = new YourOwnWorkshop();

            yow.Show();
            this.Hide();
        }
Пример #3
0
        private void btnsalir_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form f = new YourOwnWorkshop();

            f.Show();
        }
Пример #4
0
        private void btnlog_Click(object sender, EventArgs e)
        {
            Form log = new YourOwnWorkshop();

            this.Hide();
            log.Show();
        }
Пример #5
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form f = new YourOwnWorkshop();

            f.Show();
        }
Пример #6
0
        private void btnlogin_Click(object sender, EventArgs e)
        {
            Form form = new YourOwnWorkshop();

            form.Show();
            this.Hide();
        }
Пример #7
0
        private void btnguadar_Click(object sender, EventArgs e)
        {
            if (txtapellido.Text.Trim() == "" || txtname.Text.Trim() == "" || txtdui.Text.Trim() == "" || txtcorreo.Text.Trim() == "" || txtdireccion.Text.Trim() == "" || txtuser.Text.Trim() == "" || txtpass.Text.Trim() == "" || txttel.Text.Trim() == "" || pctlogo == null || txtp1.Text.Trim() == "" || txtp2.Text.Trim() == "" || txtp3.Text.Trim() == "")
            {
                MessageBox.Show("Existen campos vacios", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else if (Email_Valido(txtcorreo.Text) == false)
            {
                errorProvider1.SetError(txtcorreo, " Ingrese un Email Válido");
                txtcorreo.Focus();

                return;
            }
            else
            {
                constructoruser add = new constructoruser();
                add.nombre    = txtname.Text;
                add.apellido  = txtapellido.Text;
                add.correo    = txtcorreo.Text;
                add.usuario   = txtuser.Text;
                add.telefono  = txttel.Text;
                add.dui       = txtdui.Text;
                add.fecha     = dateTimePicker1.Text;
                add.direccion = txtdireccion.Text;
                add.pregunta1 = txtp1.Text;
                add.pregunta2 = txtp2.Text;
                add.pregunta3 = txtp3.Text;
                add.clave     = txtxcifrado.Text;
                add.genero    = Convert.ToInt32(cmbgender.SelectedValue);
                add.ocupacion = Convert.ToInt32(cmbocupacion.SelectedValue);
                add.estado    = Convert.ToInt32(cmbestado.SelectedValue);

                MemoryStream ms = new MemoryStream();
                pctlogo.Image.Save(ms, ImageFormat.Jpeg);
                byte[] abyte   = ms.ToArray();
                string encoded = Convert.ToBase64String(abyte);
                add.foto = encoded;
                errorProvider1.Clear();
                validar.Visible = true;
                if (registrouser.registraradmin(add) >= 1)
                {
                    Form user = new YourOwnWorkshop();
                    user.Show();
                    this.Hide();
                }
            }
        }
Пример #8
0
        private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            constructorrecuinterno upd = new constructorrecuinterno();

            if (txtpass.Text.Trim() == "" || txtpassveri.Text.Trim() == "")
            {
                MessageBox.Show("Campos vacios", "Por favor llene los campos", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            else
            {
                upd.pass = txtxcifrado.Text;

                upd.user = constructotlogin.usuario;
                funciones_recu_interno.pass(upd);
                Form frm = new YourOwnWorkshop();
                this.Hide();
                frm.Show();
            }
        }
Пример #9
0
        private void btnguadar_Click(object sender, EventArgs e)
        {
            if (txtname.Text.Trim() == "" || txtit.Text.Trim() == "" || txtreplegal.Text.Trim() == "" || txtdireccion.Text.Trim() == "" || txtcod.Text.Trim() == "" || pctlogo.Image == null)
            {
                MessageBox.Show("Existen campos vacios", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else if (Email_Valido(txtcorreo.Text) == false)
            {
                errorProvider1.SetError(txtcorreo, " Ingrese un Email Válido");
                txtcorreo.Focus();

                return;
            }
            else
            {
                constructorsistema add = new constructorsistema();
                add.nombre        = txtname.Text;
                add.representante = txtreplegal.Text;
                add.NIT           = txtit.Text;
                add.direccion     = txtdireccion.Text;
                add.correo        = txtcorreo.Text;
                add.codigo_postal = Convert.ToInt32(txtcod.Text);

                MemoryStream ms = new MemoryStream();
                pctlogo.Image.Save(ms, ImageFormat.Jpeg);
                byte[] abyte   = ms.ToArray();
                string encoded = Convert.ToBase64String(abyte);
                add.foto = encoded;
                errorProvider1.Clear();
                validar.Visible = true;
                if (registroempresa.empresa(add) >= 1)
                {
                    Form user = new YourOwnWorkshop();
                    user.Show();
                    this.Hide();
                }
            }
        }