コード例 #1
0
        private void BtnGuardar_Click(object sender, EventArgs e)
        {
            int IDPersona = int.Parse(TxtID.Text);

            Comm.RegistrarPersona(IDPersona, TxtNombre.Text, TxtPApellido.Text, TxtSApellido.Text, TxtTelefono.Text, TxtContrasena.Text);
            if (chkMensajero.Checked)
            {
                Comm.RegistrarMensajero(IDPersona);
                Comm.userid = (IDPersona);
                DashboardMensajero Mensajero = new DashboardMensajero();
                Mensajero.Show();
            }
            else
            {
                int IDTarjeta;
                int Edad         = int.Parse(TxtEdad.Text);
                int CodDistrito  = int.Parse(CboDistrito.SelectedValue.ToString());
                int CodDireccion = Comm.RegistrarDireccion(TxtLinea1.Text, TxtLinea2.Text, CodDistrito);
                if (ChkTarjeta.Checked)
                {
                    DateTime Vencimiento = DateTime.Parse("01/" + TxtFecExp.Text);
                    int      CodTarjeta  = int.Parse(TxtCodigo.Text);
                    IDTarjeta = Comm.RegistrarTarjeta(TxtTarjeta.Text, Vencimiento, CodTarjeta, TxtProveedor.Text);
                }
                else
                {
                    IDTarjeta = -1;
                }
                Comm.RegistrarCliente(IDPersona, TxtCorreo.Text, Edad, IDTarjeta, CodDireccion);
                Comm.userid = (IDPersona);
                Dashboard_cliente Cliente = new Dashboard_cliente();
                Cliente.Show();
            }
            this.Close();
        }
コード例 #2
0
        private void btn_Ingresar_Click(object sender, EventArgs e)
        {
            Form Formulario;

            if (Comm.claveValida(txtUsuario.Text, txtpass.Text))

            {
                if (Comm.EsCliente(txtUsuario.Text))
                {
                    Comm.userid = Convert.ToInt32(txtUsuario.Text);
                    Formulario  = new Dashboard_cliente();
                }
                else if (txtUsuario.Text == "123" && txtpass.Text == "patito2")
                {
                    Comm.userid = Convert.ToInt32(txtUsuario.Text);
                    Formulario  = new Dash_Admin();
                }
                else
                {
                    Comm.userid = Convert.ToInt32(txtUsuario.Text);
                    Formulario  = new DashboardMensajero();
                }

                Formulario.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Usuario o clave incorrecto");
            }
        }
コード例 #3
0
        private void BtnVolver_Click(object sender, EventArgs e)
        {
            Dashboard_cliente Dash = new Dashboard_cliente();

            Dash.Show();
            Close();
        }
コード例 #4
0
        private void btnIngresar_Click(object sender, EventArgs e)
        {
            Dashboard_cliente Dash = new Dashboard_cliente();

            Dash.Show();
            Close();
        }
コード例 #5
0
        /* private void AbrirFromHijo(object formHija)
         * {
         *   if (this.Panelprincipal.Controls.Count > 0)
         *       this.Panelprincipal.Controls.RemoveAt(0);
         *   Form fh = formHija as Form;
         *   fh.TopLevel = false;
         *   fh.Dock = DockStyle.Fill;
         *   this.Panelprincipal.Controls.Add(fh);
         *   fh.Show();
         *
         * }*/

        private void button1_Click_1(object sender, EventArgs e)
        {
            this.Hide();
            Form Formulario1 = new Dashboard_cliente();

            Formulario1.Show();
        }
コード例 #6
0
        private void btnIngresar_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form Formulario1 = new Dashboard_cliente();

            Formulario1.Show();
        }