示例#1
0
 public void AgregaProucto(TextBox[] losid, TextBox[] nombres, TextBox[] precios) //, Byte[][] arBy)
 {
     int?[] id = new int?[5];
     id[0] = d.EncuentraIdCatalogPorDescripcion(losid[0].Text);
     id[1] = d.EncuentraIdColorPorNombre(losid[1].Text);
     id[2] = d.EncuentraIdBrandPorMarca(losid[2].Text);
     id[3] = d.EncuentraIdProviderPorNombre(losid[3].Text);
     id[4] = d.EncuentraIdCatalogPorSeason(losid[4].Text);
     string[]   nom = new string[5];
     Decimal?[] dec = new Decimal?[3];
     for (int i = 0; i < 5; i++)
     {
         nom[i] = nombres[i].Text;
     }
     for (int i = 0; i < 3; i++)
     {
         dec[i] = Decimal.Parse(precios[i].Text);
     }
     d.AgregaProducto(id, nom, dec);
 }