Example #1
0
        private void btnregisauto_Click(object sender, EventArgs e)
        {
            clsNegPerson np = new clsNegPerson();

            var placa       = txtplacasa.text;
            var descripcion = txtDescrip.text;
            var propietario = txtPropietario.text;
            var tipoauto    = 0;
            var horini      = DateTime.Now;

            GlobalVariablesform.horaini = horini;
            if (txtcomcar.Text == "Carro")
            {
                tipoauto = 1;
            }
            else if (txtcomcar.Text == "Moto")
            {
                tipoauto = 2;
            }
            else
            {
                tipoauto = 3;
            }



            MessageBox.Show("Se guardo correctamente" + placa);
            np.insertcars(placa, descripcion, propietario, tipoauto);
            this.Hide();
        }
        private void formulaio_busquedad_Load(object sender, EventArgs e)
        {
            DataTable    dt = new DataTable();
            clsNegPerson np = new clsNegPerson();

            dt = np.GetAllcars();

            dgvcarsworks.DataSource = dt;
            dgvcarsworks.Refresh();
        }
        private void panel1_Paint(object sender, PaintEventArgs e)
        {
            int iduser = Presentacion.GlobalVariablesform.usuario_id;

            clsNegPerson np     = new clsNegPerson();
            var          getus  = np.getus(iduser);
            var          tipous = np.tipousuario(iduser);
            var          lbl1   = lbluser.Text;

            lbl1 = getus;
        }
        private void btncreateparkinglot_Click(object sender, EventArgs e)
        {
            clsNegPerson np = new clsNegPerson();

            var   nombrelocal    = txtNombrelocal.text;
            var   ubicacion      = txtUbicacion.text;
            var   cobroxhora     = float.Parse(txtTarifa.text);
            var   lugares        = Int32.Parse(txtLugares.text);
            float saldo          = 0;
            int   coche_actuales = 0;
            var   iduser         = Presentacion.GlobalVariablesform.usuario_id;

            np.insertParkings(iduser, nombrelocal, ubicacion, cobroxhora, lugares, saldo, coche_actuales);
            MessageBox.Show("Se registro el estacionamiento");
            this.Hide();
        }
Example #5
0
        private void btncreateaccount_Click(object sender, EventArgs e)
        {
            clsNegPerson np         = new clsNegPerson();
            var          usuario    = txtchagetext.text;
            var          contraseña = txtContra.text;
            var          nombre     = txtNomb.text;
            var          apellido   = txtApellido.text;
            var          email      = txtemail.text;
            var          direccion  = txtdireccion.text;
            var          cargo      = txtcargo.text;


            var tipo = 0;

            if (txtcombo.Text == "Admin")
            {
                tipo = 3;
            }
            else if (txtcombo.Text == "Normal")
            {
                tipo = 4;
            }
            else
            {
                tipo = 5;
            }
            np.insertSOMETHING(nombre, apellido, email, direccion, cargo, usuario, contraseña, tipo);
            MessageBox.Show("Se registro exitosamente");
            this.Hide();

            /* clsNegPerson np = new clsNegPerson();
             *
             * var userr = txtchagetext.text;
             * var contraseña = txtContra.text;
             * var ubi = txtUbicacion.text;
             * var nomesta = txtNombreesta.text;
             * var nom = txtNomb.text;
             * var dni = Int32.Parse(txrDni.text);
             * var cel = Int32.Parse(txtcel.text);
             * var tip = txttipo.text;
             * var cobrohora = float.Parse(txtcobro.text);
             *
             *
             * MessageBox.Show("Se guardo correctamente" + userr);
             * np.insertSOMETHING(userr,contraseña,ubi,nomesta,nom,dni,cel,tip, cobrohora);
             */
        }
        private void btnbusqueda_Click(object sender, EventArgs e)
        {
            if (txtBusquennoma.text == "")
            {
                MessageBox.Show("Escribe algo");
            }
            else
            {
                Size = new Size(850, 683);

                DataTable    dt = new DataTable();
                clsNegPerson np = new clsNegPerson();
                dt = np.findcars(txtBusquennoma.text);

                dgvcarsworks.DataSource = dt;
                dgvcarsworks.Refresh();
            }
        }
Example #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            clsNegPerson np         = new clsNegPerson();
            var          user       = txtUser.Text;
            var          contraseña = txtPassword.Text;
            // np.IniciarSesion(user,contraseña);
            int agarra = np.IniciarSesion(user, contraseña);

            if (agarra != 0)
            {
                var       mensaje = string.Format("Bienvenido {0}", txtUser.Text);
                dashboard dhb     = new dashboard();
                dhb.Show();
                this.Hide();
                GlobalVariablesform.usuario_id = agarra;

                MessageBox.Show("Entrastes usuario : " + agarra);
            }
            else
            {
                MessageBox.Show("No entrastes x gil");
            }
        }