juaarias
04-10-2011, 00:57:35
procedure TfrmAgregar.btnAceptarClick(Sender: TObject);
var
i:integer;
begin
//controlar que el producto no este cargado
for i := 0 to frmInicio.lstProductos.Count - 1 do
if frmInicio.lstProductos.items[i].text??? = txtPreNuevo.text then QUIERO SABER SI LA PALABRA ESTA EN LA LISTA ENTONCES DIGO QUE YA ESTA CARGADA
showmessage('El producto ya esta cargado')
else begin
//paso el producto y el precio nuevo al inicio
frmInicio.lstPrecios.Items.Add (txtPreNuevo.text);
frmInicio.lstProductos.Items.Add (txtProdNuevo.text);
close;
end;
end;
var
i:integer;
begin
//controlar que el producto no este cargado
for i := 0 to frmInicio.lstProductos.Count - 1 do
if frmInicio.lstProductos.items[i].text??? = txtPreNuevo.text then QUIERO SABER SI LA PALABRA ESTA EN LA LISTA ENTONCES DIGO QUE YA ESTA CARGADA
showmessage('El producto ya esta cargado')
else begin
//paso el producto y el precio nuevo al inicio
frmInicio.lstPrecios.Items.Add (txtPreNuevo.text);
frmInicio.lstProductos.Items.Add (txtProdNuevo.text);
close;
end;
end;