freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

silverlight強大的datagrid組件(編輯修改稿)

2024-09-12 23:55 本頁面
 

【文章內容簡介】 += new EventHandler(webClient_GetEmployeesCompleted)。}void webClient_GetEmployeesCompleted(object sender, GetEmployeesCompletedEventArgs e)...{ = 。}void OnLoadComplete(IAsyncResult result)...{DataServiceQuery query = (DataServiceQuery)。 = (result).ToList()。//將最終結果傳給DataGrid}}}最終效果圖: 強大的DataGrid組件[4]_實現(xiàn)CURD[上]在本教程中,主要為大家講述如何使用DataGrid來對后臺數(shù)據(jù)庫進行CURD操作。由于CURD操作是與數(shù)據(jù)庫交互中最為常用的,因此掌握其使用方法就顯得尤為必要。本教程將使用Linq to SQL Class + Silverlightenabled WCF Service來實現(xiàn)這一過程。準備工作1)建立起測試項目2)創(chuàng)建測試用數(shù)據(jù)庫細節(jié)詳情請見強大的DataGrid組件[2]_數(shù)據(jù)交互。創(chuàng)建Linq to SQL 數(shù)據(jù)模型類細節(jié)詳情請見強大的DataGrid組件[3]_數(shù)據(jù)交互之Linq to SQL。建立Silverlightenabled WCF Service數(shù)據(jù)通信服務建立的過程參見強大的DataGrid組件[3]_數(shù)據(jù)交互之Linq to SQL。然而,:using ...System。using 。using 。using 。using 。using 。using 。using EmployeesContext。using EmployeesEntities。namespace datagridcurd...{[ServiceContract(Namespace = )][AspNetCompatibilityRequirements(RequirementsMode = )]public class EmployeeInfoWCFService...{[OperationContract]public List GetEmployees()...{EmployeeModelDataContext db = new EmployeeModelDataContext()。return ()。}[OperationContract]public void Insert(Employees employee)...{EmployeeModelDataContext db = new EmployeeModelDataContext()。string employeename = 。int employeeage = 。string strsql = INSERT INTO Employee(EmployeeName,EmployeeAge) VALUES(39。 + employeename + 39。, + () + )。(strsql)。}[OperationContract]public void Update(List employee)...{EmployeeModelDataContext db = new EmployeeModelDataContext()。( x =...{int employeeid = 。string employeename = 。int employeeage = 。string strsql = UPDATE Employee SET EmployeeName=39。 + employeename +39。,EmployeeAge= + () + WHERE EmployeeID= + ()。(strsql)。})。}[OperationContract]public void Delete(Employees employee)...{EmployeeModelDataContext db = new EmployeeModelDataContext()。int employeeid = 。string strsql = DELETE FROM Employee WHERE EmployeeID=+()。(strsql)。}// Add more operations here and mark them with [OperationContract]}}創(chuàng)建SilverlightClient界面及組件代碼:UserControlxmlns= xmlns:x=xmlns:d=xmlns:mc= mc:Ignorable=d xmlns:data=clrnamespace:。assembly=x:Class=d:DesignWidth=320 d:DesignHeight=240Grid x:Name=LayoutRoot Background=White Width=320 Height=240data:DataGrid x:Name=dgEmployee Margin=8,8,8,48 Background=FFCEDBE8/Button x:Name=btnGetData Height=30 HorizontalAlignment=Left Margin=8,0,0,8VerticalAlignment=Bottom Width=64 Content=GetData/Button x:Name=btnInsert Height=30 HorizontalAlignment=Left Margin=88,0,0,8 VerticalAlignment=Bottom Width=64 Content=Insert/Button x:Name=btnSave Height=30 HorizontalAlignment=Right Margin=0,0,88,8 VerticalAlignment=Bottom Width=64 Content=Save/Button x:Name=btnDelete Height=30 HorizontalAlignment=Right Margin=0,0,8,8 VerticalAlignment=Bottom Width=64 Content=Delete//Grid/UserControl:using ...System。using 。using 。using 。using 。using 。using 。using 。using 。using 。using 。using 。//using 。//引入數(shù)據(jù)服務所在命名空間using 。//引入ObservableCollection所在命名空間namespace SilverlightClient...{public partial class MainPage : UserControl...{List BoundData = new List()。int rowCount = 0。bool isInsertOrUpdate = false。public MainPage()...{InitializeComponent()。 += new RoutedEventHandler(btnGetData_Click)。 += new RoutedEventHandler(btnInsert_Click)。 += new RoutedEventHandler(btnSave_Click)。 += new RoutedEventHandler(btnDelete_Click)。}void btnDelete_Click(object sender, RoutedEventArgs e)...{EmployeeInfoWCFServiceClient webClient = new EmployeeInfoWCFServiceClient()。( as Employees)。 += new EventHandler(webClient_DeleteCompleted)。}void webClient_DeleteCompleted(object sender, e)...{}void btnSave_Click(object sender, RoutedEventArgs e)...{if (isInsertOrUpdate)...{EmployeeInfoWCFServiceClient webClient = new EmployeeInfoWCFServiceClient()。( as Employees)。 += new EventHandler(webClient_InsertCompleted)。}else...{EmployeeInfoWCFServiceClient webClient = new EmployeeInfoWCFServiceClient()。ObservableCollection updatemodel = new ObservableCollection()。foreach (object o in )...{(o as Employees)。 }(updatemodel)。1
點擊復制文檔內容
職業(yè)教育相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1