20140422-dddw連動設計

在同一個輸入介面


如果選 A 條件,如果希望 B 條件直接做變化


可以試看看下列的語法


window_name.ue_dbsearchdropdown()
-------------------------------------------------------
DataWindowChild l_child_depsort
string kind
kind = adw_cri.GetItemString(adw_cri.GetRow(),"grad_kind")

if kind = "1" then
adw_cri.GetChild ('grad_sysno', l_child_depsort)
l_child_depsort.Filter ()
l_child_depsort.SetSort ("neg_gradreg_grad_sysno A")
l_child_depsort.Sort ()
else
adw_cri.GetChild ('grad_sysno', l_child_depsort)
l_child_depsort.SetFilter ("neg_gradreg_grad_kind = '2'")
l_child_depsort.Filter ()
l_child_depsort.SetSort ("neg_gradreg_grad_sysno A")
l_child_depsort.Sort ()
end if

return 1








dw_1.dropdown()
-------------------------------------------------------
DataWindowChild l_child_depsort
string kind
kind = dw_1.GetItemString(1,"s_id")

dw_1.GetChild ('s_unit', l_child_depsort)
l_child_depsort.SetFilter ("s_id= '" + kind +"'")
  //傳值進來,重新產生新的選單
l_child_depsort.Filter ()
l_child_depsort.SetSort ("s_unit A")
l_child_depsort.Sort ()

留言

熱門文章