Exemple #1
0
        static void Main(string[] args)
        {
            List <Productos> lista = new List <Productos>();
            Buissnes         n     = new Buissnes();

            lista = n.SearchProductos(0, "p");
            foreach (var item in lista)
            {
                Console.WriteLine(item.Id);
                Console.WriteLine(item.Nombre);
            }
            Console.ReadLine();
        }
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         Colores color = new Colores
         {
             Name        = txt_name.Text,
             Description = txt_desc.Text,
             HexaDecimal = lbl_hexa.Text,
             IsEnable    = true
         };
         Buissnes buis = new Buissnes();
         buis.InsertColor(color);
         MessageBox.Show("Color agregado");
     }
     catch {
         MessageBox.Show("Error al crear color");
     }
     this.Close();
 }