public formConsultaUsuariosView(String title, Icon icon, FileManager data, FileManager alquileres)
        {
            InitializeComponent();
            this.data = data;
            this.alquileres = alquileres;

            this.Text = title;
            this.Icon = icon;

            LoadData();
        }
        public formAlquileres(String title, Icon icon, FileManager users, FileManager films, FileManager data)
        {
            InitializeComponent();

            this.users = users;
            this.films = films;
            this.data = data;

            this.Text = title;
            this.Icon = icon;

            this.tbTitulo.ReadOnly = true;
            this.tbAño.ReadOnly = true;
            this.tbDuracion.ReadOnly = true;
            this.tbGenero.ReadOnly = true;
            this.tbClasificacion.ReadOnly = true;

            this.bIzquierda.Enabled = false;
            if (films.WEIGHT < 1)
                this.bDerecha.Enabled = false;

            this.flpDevolver.Hide();

            if (0 < users.WEIGHT)
            {
                for (int i = 0; i < users.WEIGHT; i++)
                {
                    this.userIds.Add(users.GetRegistryWithID(i)[0]);
                    this.cbUsuarios.Items.Add(users.GetRegistryWithID(i)[1] + " " + users.GetRegistryWithID(i)[2]);
                }
            }
            else
                this.bAlquilar.Enabled = false;

            if (0 < films.WEIGHT)
            {
                LoadDataInForm(0);
            }
            else
                this.bAlquilar.Enabled = false;
        }
Example #3
0
        private void LoadData()
        {
            String[] aux = { "ID", "Nombre", "Apellidos", "DNI", "Edad", "Sexo", "Telefono", "Dirección" };
            usuarios = new FileManager("usuarios", aux);
            usuarios.Load();

            String[] aux2 = { "ID", "Titulo", "Año", "Duracción", "Clasificación", "Genero", "UriPortada" };
            peliculas = new FileManager("peliculas", aux2);
            peliculas.Load();

            String[] aux3 = { "ID", "IDUsuario", "IDPelicula" };
            alquileres = new FileManager("alquileres", aux3);
            alquileres.Load();
        }