For example: A table ID NAME SEX etc...
Table B · · input_date next_of_kin...
DW_ADD1 window AS ID AS the NAME SEX input_date next_of_kin
I think when I was A new record can go to the basic information of the master record, at the same time in line B table to add A user to edit, save B table after add A line, A table with A new basic information,
My solution:
Dw_detail. ShareData (dw_add1)//dw_update data window sharing dw_detail
//write data
Ls_mid=dw_master. GetItemString (ll_currow, "hid")
Ls_bid=dw_master. GetItemString (ll_currow, "patient_id")//ID
Ls_cs=dw_master. GetItemNumber (ll_currow, "visit_id")//admission
Ls_vid=dw_master. GetItemString (ll_currow, "inp_no")//hospitalization,
Ls_name=dw_master. GetItemString (ll_currow, "name")//name
Ls_sex=dw_master. GetItemString (ll_currow, "sex")//gender
Ls_dept=dw_master. GetItemString (ll_currow, "dept")//department
Ls_zd=dw_master. GetItemString (ll_currow, "diagnosis_desc")//diagnosis
Ls_dh=dw_master. GetItemString (ll_currow, "next_of_kin_phone")//phone
Ls_gzdw=dw_master. GetItemString (ll_currow, "unit_in_contract")//work
Ls_dz=dw_master. GetItemString (ll_currow, "mailing_address")//home address
Ls_jgys=dw_master. GetItemstring (ll_currow, "doctor_in_charge")//operate the doctor
Ls_flag=dw_master. GetItemstring (ll_currow, "flag")//submit
If isnull (ls_bid) then ls_bid='
If dw_detail. RowCount () & gt; 0 then
Ls_mid=dw_detail. GetItemString (1, "mid")
End the if
////instance variable
Dw_add1. SetItem (1, "patient_id", ls_bid)
Dw_add1. SetItem (1, "visit_id", string (ls_cs))
Dw_add1. SetItem (1, "inp_no", ls_vid)
Dw_add1. SetItem (1, "NAME", ls_name)
Dw_add1. SetItem (1, "dept", ls_dept)
Dw_add1. SetItem (1, "sex", ls_sex)
Dw_add1. SetItem (1, "date_of_birth", string (ls_date))
Dw_add1. SetItem (1, "MAILING_ADDRESS", ls_dz)
Dw_add1. SetItem (1, "NEXT_OF_KIN_PHONE", ls_dh)
Dw_add1. SetItem (1, "UNIT_IN_CONTRACT", ls_gzdw)
Dw_add1. SetItem (1, "doctor_in_charge", ls_jgys)
Dw_add1. SetItem (1, "DIAGNOSIS_DESC", ls_zd)
Dw_add1. SetItem (1, "operator", gs_username)
Dw_add1. SetItem (1, "flag", ls_flag)
The question now is, why I Shared data window display only after the first row of data! Rather than I insert table B empty!!!!!!!!!!! Consult!!!!!!!!!!!!!!
CodePudding user response:
Be consistent in ShareData two dw data sourceCodePudding user response:
Is consistent with the ~ ~ I have been able to share data, I just want to share for him!!!!!!!!!! For example, I Shared the first line of the data, the second line, no data when I newly inserted, I want to share the second line, how to control ~???????