Exemple #1
0
 public Deposito()
 {
     this.BackgroundImage       = Properties.Resources.Libros;
     this.BackgroundImageLayout = ImageLayout.Stretch;
     this.SetStyle(
         ControlStyles.AllPaintingInWmPaint |
         ControlStyles.DoubleBuffer,
         true);
     InitializeComponent();
     //FormGrid();
     Form1_Load();
     Form2_Load();
     Form3_Load();
     aux = new UserData
     {
         Nombre       = "",
         Autor        = "",
         ISBN         = "",
         Edicion      = "",
         AñoImpresion = "",
         Modelo       = "",
         Idioma       = ""
     };
     auxSearcher = new ProductSearchModel
     {
     };
     auxColeccion    = new ProductLibroLogic();
     libros          = auxColeccion.GetLibros(auxSearcher);
     CollectionTotal = libros;
     InitializeListView();
 }
Exemple #2
0
        /* private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
         * {
         *   selected = this.comboBox1.GetItemText(this.comboBox1.SelectedItem);
         *
         *   if (comboBox1.SelectedIndex > -1)
         *   {
         *       listView1.Clear();
         *       FormGrid();
         *       CargarDeposito(selected);
         *
         *   }
         * }
         *
         *    public string Nombre { get; set; }
         *   public string Autor { get; set; }
         *   public int? PriceFrom { get; set; }
         *   public int? PriceTo { get; set; }
         *   public int? Cantidad { get; set; }
         *   public int? CantidadFrom { get; set; }
         *   public int? PrecioPeso { get; set; }
         *   public int? PrecioDolar { get; set; }
         *   public string ISBN { get; set; }
         *   public string Edicion { get; set; }
         *   public string AñoImpresion { get; set; }
         *   public string Modelo { get; set; }
         *   public string Idioma { get; set; }
         */

        private void button2_Click(object sender, EventArgs e)
        {
            auxSearcher = new ProductSearchModel
            {
                Nombre       = textBox8.Text,
                Autor        = textBox9.Text,
                ISBN         = textBox10.Text,
                Edicion      = textBox11.Text,
                AñoImpresion = textBox7.Text,
                Idioma       = textBox12.Text,
            };

            if (numericUpDown3.Value > 0)
            {
                auxSearcher.CantidadFrom = Convert.ToInt32(numericUpDown3.Value);
            }
            if (comboBox6.SelectedItem != null)
            {
                auxSearcher.Modelo = comboBox6.SelectedItem.ToString();
            }
            if (!String.IsNullOrEmpty(textBox14.Text))
            {
                auxSearcher.PriceFrom = Convert.ToInt32(textBox14.Text);
            }
            if (!String.IsNullOrEmpty(textBox13.Text))
            {
                auxSearcher.PriceTo = Convert.ToInt32(textBox13.Text);
            }


            /*listView1.Clear();
             * FormGrid();*/
            auxColeccion = new ProductLibroLogic();
            libros       = auxColeccion.GetLibros(auxSearcher);
            InitializeListView();
        }