Microsoft Office Tutorials and References
In Depth Information
entity.ModifiedDate = DateTime.Parse(reader[12].ToString());
}
}
}
return entity;
as a recommended practice, add connection strings to the web.config file in the connectionstrings section
instead of including them in the code. also, make sure to encrypt the connectionStrings element if you have information
such as the username and password in the connection string.
Note
14. return to BDC explorer, expand entity1 under the returnParameter of the ReadItem method,
and select BusinessEntityID . From the properties window, ensure that the identifier value
is identifier1. Check this for the ReadList method’s returnParameter as well.
these steps provide you with the infrastructure for retrieving data as a list or a single item. the next step is to
implement update functionality when a single item is selected.
15.
in the BDC explorer window, select entity1. in the BDC Method Details window, click on “add
a Method” and choose Create updater Method as shown in Figure 4-25 .
Figure 4-25. Adding the Create Updater method
this step automatically creates an empty Update method in the entity1service.cs file. note that entity1 would be
an In parameter for this method. add another parameter to serve as the selected row item.
16.
Click on add parameter, and choose Create parameter in the name column.
17.
Choose the direction as “in” (in the Direction column).
18.
edit the parameter typeDescriptor in the type Descriptor column by clicking on the edit link
on the drop-down menu.
19.
in the type Descriptor properties window, do the following:
a.
set the name property to BusinessEntityID and the type name as System.Int32 .
select the identifier as Identifier1 .
b.
set the pre-updater Field value to True . the pre-updater Field is a Boolean value that
applies only to type Descriptors and indicates if the typeDescriptor object stores the
latest business application data.
 
 
Search JabSto ::




Custom Search