The Cid James
26-10-2017, 00:56:50
Estoy trabajando con sql server, zeoslib y delphi 10.2, en el cual tengo un problema con el form en este caso fventa, el cual cada vez que lo abro sin hacer el post el autoincremental de numero de venta incrementa sin siquiera hacer post. El post lo tengo en el boton aceptar con el siguiente codigo
procedure TfVenta.vAceptarClick(Sender: TObject);
begin
fmodulo.qFechahora.Active := true;
fmodulo.qFechahora.Open;
fmodulo.tVenta['fecha'] := fmodulo.qFechahora['fecha'];
fmodulo.tVenta['hora'] := fmodulo.qFechahora['hora'];
fmodulo.tVenta['id_cliente'] := idcliente;
fmodulo.tVenta.Post;
fmodulo.qFechahora.Active := false;
end;
Y en el boton cancelar tengo
procedure TfVenta.vCancelarClick(Sender: TObject);
begin
fmodulo.tVenta.Active := false;
fmodulo.tVentadetalle.Active := false;
close;
end;
Por lo cual no deberia incrementar la venta o si? :confused:
procedure TfVenta.vAceptarClick(Sender: TObject);
begin
fmodulo.qFechahora.Active := true;
fmodulo.qFechahora.Open;
fmodulo.tVenta['fecha'] := fmodulo.qFechahora['fecha'];
fmodulo.tVenta['hora'] := fmodulo.qFechahora['hora'];
fmodulo.tVenta['id_cliente'] := idcliente;
fmodulo.tVenta.Post;
fmodulo.qFechahora.Active := false;
end;
Y en el boton cancelar tengo
procedure TfVenta.vCancelarClick(Sender: TObject);
begin
fmodulo.tVenta.Active := false;
fmodulo.tVentadetalle.Active := false;
close;
end;
Por lo cual no deberia incrementar la venta o si? :confused: