File: n_dropdown_calendar.sru
Size: 1014
Date: Mon, 07 Apr 2008 21:31:48 +0200
$PBExportHeader$n_dropdown_calendar.sru
forward
global type n_dropdown_calendar from n_base_dropdown
end type
end forward

global type n_dropdown_calendar from n_base_dropdown
string #windowclassname = "w_dropdown_calendar"
end type
global n_dropdown_calendar n_dropdown_calendar

type variables

end variables

on n_dropdown_calendar.create
call super::create
end on

on n_dropdown_calendar.destroy
call super::destroy
end on

event ke_setdwvalue;//override
IF ISVALID(idw_source) THEN
   IF al_row <= adw.RowCount() THEN
      //determine datatype
      n_svc_mgr lnv_svc
      n_svc_dw lnv_dw
      string ls_type
      
      lnv_svc.of_LoadSvc(lnv_dw, CSvc.DW)
      ls_type = lnv_dw.of_Getcolumndatatype(adw, as_colname)
      
      IF ls_type = CDWDataType.DATE THEN
         adw.SetItem(al_row, as_colname, DATE(aa_value))
      ELSEIF ls_type = CDWDataType.DATETIME THEN
         adw.SetItem(al_row, as_colname, DATETIME(DATE(aa_value), TIME("00:00:00")))
      END IF
      
      adw.AcceptText()
   END IF
END IF
end event