Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Updating Server Data Using a Web Service
Đang chuẩn bị liên kết để tải về tài liệu:
Updating Server Data Using a Web Service
Thanh Hường
81
6
pdf
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
[ Team LiB ] Recipe 4.11 Updating Server Data Using a Web Service Problem You want to update a data source using an XML web service and use the web service from your client application. Solution Use a DataSet object. The XML web service code contains two methods: LoadOrders( ) | Team LiB Recipe 4.11 Updating Server Data Using a Web Service Problem You want to update a data source using an XML web service and use the web service from your client application. Solution Use a DataSet object. The XML web service code contains two methods LoadOrders Creates and returns a DataSet containing the Orders and Order Details tables from Northwind and a DataRelation between those tables. UpdateOrders Takes a DataSet argument containing the changes made to the DataSet created by the LoadOrders method creates two DataAdapter objects with CommandBuilder generated update logic for each and uses the DataAdapter objects to update the Orders and Order Details tables in Northwind. The client-side code contains two event handlers Form.Load Sets up the example by calling the LoadOrders method in the web service to populate a DataSet. The default view of the Orders table is bound to the data grid on the form. Update Button.Click Calls the UpdateOrders method in the web service passing a DataSet containing changes made to the DataSet since the form was loaded or since the last time the UpdateOrders method was called. The C code for the XML web service is shown in Example 4-25. Example 4-25. File NorthwindServiceCS.asmx.es Namespaces variables and constants using System using System.ComponentModel using System.Web.Services using System.Configuration using System.Data using System.Data.SqlClient public const String ORDERS_TABLE Orders public const String ORDERDETAILS_TABLE OrderDetails public const String ORDERID_FIELD OrderlD public const String ORDERS_ORDERDETAILS_RELATION Order_OrderDetails_Relation . . . WebMethod public DataSet LoadOrders DataSet ds new DataSet SqlDataAdapter da Fill the Order table and add it to the DataSet. da new SqlDataAdapter SELECT FROM Orders ConfigurationSettings.AppSettings DataConnectString DataTable orderTable new DataTable ORDERS_TABLE da.FillSchema orderTable SchemaType.Source da.Fill orderTable ds.Tables.Add orderTable Fill the .
TÀI LIỆU LIÊN QUAN
Updating Server Data Using a Web Service
Updating Server Data Using .NET Remoting
Updating Administration and Support Skills from Microsoft Exchange Server 5.x to Microsoft Exchange 2000 Beta 3
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.