⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 employeesservice.cs

📁 中文名:Windows Forms 程序设计 英文名:Windows Forms Programming in c# 作者: Chris Sells 翻译: 荣耀 蒋贤哲 出版社:人民
💻 CS
字号:
using System.Web;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Web.Services;
using System.Web.Services.Protocols;

using NorthwindDataSetWSTableAdapters;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1, EmitConformanceClaims = true)]
public class EmployeesService : System.Web.Services.WebService {

  [WebMethod]
  public NorthwindDataSetWS FillEmployees() {
    // Return a Northwind dataset loaded from the database
    EmployeesTableAdapter adp = new EmployeesTableAdapter();
    NorthwindDataSetWS ds = new NorthwindDataSetWS();
    adp.Fill(ds.Employees);
    return ds;
  }
  
  [WebMethod]
  public void UpdateEmployees(NorthwindDataSetWS ds) {
    // Update Northwind database with changes from the dataset
    EmployeesTableAdapter adp = new EmployeesTableAdapter();
    adp.Update(ds);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -