資源簡介
C/S架構下利用wcf做服務端訪問數據庫的demo
有服務端和客戶端的代碼
服務端連接數據庫
客戶端通過服務端訪問
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Configuration;
using?System.Data;
using?System.Linq;
using?System.Windows;
using?System.IO;
namespace?ClientDemo
{
????///?
????///?App.xaml?的交互邏輯
????///?
????public?partial?class?App?:?Application
????{
????????public?static?string?serverhost?=?““;
????????private?void?Application_Startup(object?sender?StartupEventArgs?e)
????????{
????????????//讀取配置文件中的地址
????????????StreamReader?sr?=?new?StreamReader(AppDomain.CurrentDomain.baseDirectory?+?“IPandport.ini“);
????????????serverhost?=?string.Format(“http://{0}/ServerDemo“?sr.ReadLine());
????????????sr.Close();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????352??2013-06-14?13:11??Demo\Server\ClientDemo\App.xaml
?????文件????????728??2013-06-14?13:11??Demo\Server\ClientDemo\App.xaml.cs
?????文件???????1816??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\CheckUser.xaml
?????文件????????918??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\CheckUser.xaml.cs
?????文件???????4857??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\ClientDemo.csproj
?????文件??????18432??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\ClientDemo.exe
?????文件??????44544??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\ClientDemo.pdb
?????文件??????11600??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\ClientDemo.vshost.exe
?????文件?????????14??2013-06-14?13:11??Demo\Server\ClientDemo\bin\Debug\IPandport.ini
?????文件???????2490??2013-06-14?13:11??Demo\Server\ClientDemo\ClientHelp\Client.cs
?????文件????????906??2013-06-14?13:11??Demo\Server\ClientDemo\ClientHelp\IDataba
?????文件???????1126??2013-06-14?13:11??Demo\Server\ClientDemo\Entiyandhelp\MainWindow.xaml
?????文件???????1345??2013-06-14?13:11??Demo\Server\ClientDemo\Entiyandhelp\MainWindow.xaml.cs
?????文件????????520??2013-06-14?13:11??Demo\Server\ClientDemo\Entiyandhelp\NotifyPropertyChangedob
?????文件???????2252??2013-06-14?13:11??Demo\Server\ClientDemo\Entiyandhelp\Userhelp.cs
?????文件???????2437??2013-06-14?13:11??Demo\Server\ClientDemo\Entiyandhelp\UserInfo.cs
?????文件???????2430??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\App.g.cs
?????文件???????2430??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\App.g.i.cs
?????文件???????2338??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\CheckUser.baml
?????文件???????6567??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\CheckUser.g.cs
?????文件???????6567??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\CheckUser.g.i.cs
?????文件????????924??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo.csproj.FileListAbsolute.txt
?????文件??????18432??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo.exe
?????文件???????4153??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo.g.resources
?????文件??????44544??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo.pdb
?????文件????????180??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo.Properties.Resources.resources
?????文件????????241??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo_MarkupCompile.cache
?????文件????????238??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\ClientDemo_MarkupCompile.i.cache
?????文件??????11391??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6406??2013-06-14?13:11??Demo\Server\ClientDemo\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
............此處省略76個文件信息
- 上一篇:貪吃蛇的實現及簡單AI設計課程設計報告
- 下一篇:shiro權限所需5表
評論
共有 條評論