Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 22-03-2005
Chaja Chaja is offline
Miembro
 
Registrado: ago 2004
Ubicación: Mar del Plata
Posts: 240
Poder: 22
Chaja Va por buen camino
Drag an Drop

Bueno es un poc largo pero vamos a ver:
en la grilla source no pones nada (por ahora). En la grilla Target pone en

procedure TFormAplicacionesCCCompra_2.wwDBGMovCCDragOver(Sender, Source: TObject; X,
Y: Integer; State: TDragState; var Accept: Boolean);
var coord:TGridCoord;
begin
inherited;
IF Source=wwDBGActa THEN
accept:=True
ELSE
Accept:=False;
end;

y en

procedure TFormAplicacionesCCCompra_2.wwDBGMovCCDragDrop(Sender, Source: TObject; X,
Y: Integer);
begin
inherited;
IF (Moneda3D(' ',MascaraGral, wwCDSMovCCSALDO.Value))>0 Then
begin
wwCDSAplicaciones.Insert;
wwCDSAplicacionesID_MOV.Value := IBGId_AplicacionCCCompra.Increment(1);
wwCDSAplicacionesID_MOVCCCOMPRA.Value := wwCDSMovCCID_MOVCCCOMPRA.Value;
wwCDSAplicacionesAPLICA_ID_CPBTE.Value := wwCDSMovCCID_CPBTE.Value;
wwCDSAplicacionesAPLICA_TIPOCPBTE.Value := wwCDSMovCCTIPOCPBTE.Value;
wwCDSAplicacionesAPLICA_CLASECPBTE.Value:= wwCDSMovCCCLASECPBTE.Value;
wwCDSAplicacionesAPLICA_NROCPBTE.Value := wwCDSMovCCNROCPBTE.Value;
wwCDSAplicacionesDETALLE.Value := wwCDSMovCCDETALLE.Value;
with (Source as TwwDBGrid).DataSource.DataSet DO
begin
wwCDSAplicacionesIDMOVACTA.Value := wwCDSACtaID_MOV.Value;
wwCDSAplicacionesFECHA.Value := FieldByName('Fecha').Value;
wwCDSAplicacionesPROVEEDOR.Value := FieldByName('Proveedor').Value;
wwCDSAplicacionesID_CPBTE.Value := FieldByName('Id_Cpbte').Value;
wwCDSAplicacionesTIPOCPBTE.Value := FieldByName('TipoCpbte').Value;
wwCDSAplicacionesCLASECPBTE.Value := FieldByName('ClaseCpbte').Value;
wwCDSAplicacionesNUMEROCPBTE.Value := FieldByName('NumeroCpbte').Value;
IF Moneda3d(' ',MascaraGral, FieldByName('Importe').Value)<=Moneda3d(' ',MascaraGral, wwCDSMovCCSALDO.Value) Then
wwCDSAplicacionesIMPORTE.Value :=FieldByName('Importe').Value
else
wwCDSAplicacionesIMPORTE.Value :=wwCDSMovCCSALDO.Value;
end;
wwCDSAplicaciones.Post;
end
else
ShowMessage('Comprobante con saldo 0(cero), no se pude aplicar pagos');
end;

Moneda es una funcion mia para acotar los decimales en los reales; La propiedad del DragMode en Automatico.

espero se entienda...
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 11:31:39.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi