C
chen_ke
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TMastData.OrdersAfterPost(DataSet: TDataSet);
begin
if Cust.Locate('CustNo', OrdersCustNo.Value, []) and
(CustLastInvoiceDate.Value < OrdersShipDate.Value) then
begin
Cust.Edit;
CustLastInvoiceDate.Value := OrdersShipDate.Value;
Cust.Post;
end;
Database.ApplyUpdates([Orders, Items, Parts, Cust]);
end;
该过程中CustLastInvoiceDate.Value 与 OrdersShipDate.Value这
两个字段之间是什么关系?即该if语句是什么作用?还有
Cust.Locate('CustNo', OrdersCustNo.Value, []) 语句怎么解释?
begin
if Cust.Locate('CustNo', OrdersCustNo.Value, []) and
(CustLastInvoiceDate.Value < OrdersShipDate.Value) then
begin
Cust.Edit;
CustLastInvoiceDate.Value := OrdersShipDate.Value;
Cust.Post;
end;
Database.ApplyUpdates([Orders, Items, Parts, Cust]);
end;
该过程中CustLastInvoiceDate.Value 与 OrdersShipDate.Value这
两个字段之间是什么关系?即该if语句是什么作用?还有
Cust.Locate('CustNo', OrdersCustNo.Value, []) 语句怎么解释?