Dorado 5 : 7.1.使用方式 (RF1)

数据坞中Dataset一般会在三种情况下被使用:
通过DatasetReference指定引用数据坞中的Dataset;

<Dataset id="dsDegree" type="Reference" sourceModule="sample.HR" sourceDataset="dsDegree" pageSize="10">
<MasterLink />
<Fields>
<Field name="degree" dataType="string">
<Properties />
</Field>
</Fields>
</Dataset>

被LookupField字段关联引用;

<Dataset id="dsEmployee" type="AutoSql" originTable="employee" keyFields="employee_id">
<Fields>
<Field name="employee_id" originField="employee_id" table="employee" label="工号"/>
<Field name="employee_name" originField="employee_name" table="employee"/>
<Field name="dept_id" originField="dept_id" table="employee"/>
<Field name="dept_name" type="Lookup" lookupModule="sample.HR" lookupDataset="datasetDeptForLookup" lookupField="dept_name" keyFields="dept_id" lookupKeyFields="dept_id"/>
</Fields>
</Dataset>

使用DynamicDropDown绑定dataset时需要指定数据坞中的dataset;

<Control id="dropdownEmployee" type="DynamicDropDown" fixed="true">
<Dataset type="DropDown" sourceModule="sample.HR" sourceDataset="datasetEmployee" pageSize="20"/>
</Control>