File: pwd_ds_orderline.sru
Size: 2225
Date: Sat, 08 Dec 2007 15:38:33 +0100
$PBExportComments$Class Order Line( using the non-HTML Datawindow)
global type pwd_ds_orderline from pwd_ds_cgibase
end type
end forward

global type pwd_ds_orderline from pwd_ds_cgibase
string dataobject = "pwd_d_orderline_detail"
string #detaildataobject = "pwd_d_orderline_detail"
end type
global pwd_ds_orderline pwd_ds_orderline

type variables

end variables

on pwd_ds_orderline.create
call super::create
end on

on pwd_ds_orderline.destroy
call super::destroy
end on

event pbw_setdetailretrievearguments;call super::pbw_setdetailretrievearguments;// set retrieve args
//this.of_setargument( 1,Long ( cgienv.of_getParam( 'order_id')))
//this.of_setargument( 2,Long ( cgienv.of_getParam( 'line_id')))

this.of_fillretrieveargs( )
end event

event retrieveend;call super::retrieveend;// change the Picturename Resource to a WEB PATH
long ll_row
string ls_picturename 

for ll_row = 1 to rowcount
   ls_picturename = GetItemstring ( ll_row, "product_picture_name" )
   ls_picturename = WEBPATH + "pic/products/"+ Left ( ls_picturename , Len ( ls_picturename ) - 3 ) + "gif"
   SetItem ( ll_row, "product_picture_name" , ls_picturename )

end event

event pbw_setdetailwebproperties;call super::pbw_setdetailwebproperties;// Set Self Link

// No Border for the picture
end event

event pbw_postdetailhtmlcontextapplied;call super::pbw_postdetailhtmlcontextapplied;If as_action = "Update" then 
  // After Update Re-Retrieve see changes causing a evenutally changed Item (Text, Price, Picture)
  This.Retrieve ( &
            __a_argvalue[1],  __a_argvalue[2],  __a_argvalue[3],  __a_argvalue[4],  __a_argvalue[5], &
            __a_argvalue[6],  __a_argvalue[7],  __a_argvalue[8],  __a_argvalue[9],  __a_argvalue[10], &
            __a_argvalue[11], __a_argvalue[12], __a_argvalue[13], __a_argvalue[14], __a_argvalue[15], &
            __a_argvalue[16], __a_argvalue[17], __a_argvalue[18], __a_argvalue[19], __a_argvalue[20] ) 
End if

end event