xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 125KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-07
  • 語言: C#
  • 標簽: 直接訪問??SqlServer??C#??

資源簡介

1.在我們開發嵌入式手持機應用時,經常要在Wince手持設備上和上位機之間傳遞數據 2.一般的做法是在上位機部署一個架設在IIS Web服務器上的Webservice服務端 3.這種方案有時候由于實際應用場景里工人的計算機水平有限,客戶需要簡易的實現辦法,要求不要使用遠端Webservice來做數據通訊載體 4.在這種情況下 就使用到了手持機直接訪問上位機SqlServer數據庫服務器的技術 5.本資源文案 演示了如何在.NET 開發平臺上使用C# 簡單快速有效的開發一個基于Wince操作系統手持機的掌上端應用程序 如下載后發現有問題,歡迎和我聯系 Tel:13552251484(電話或者短信) Feiton:822120391 QQ:404993079 Email:baifucn@139.com

資源截圖

代碼片段和文件信息

using?System;

using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;

namespace?LoginDataServer
{
????public?partial?class?Form1?:?Form
????{
????????///?
????????///?數據庫鏈接字符串
????????///?

????????private?string?_strConnectionString?=?string.Empty;

????????///?
????????///?數據庫連接對象
????????///?

????????private?SqlConnection?_sqlConnection?=?null;

????????///?
????????///?數據庫連接適配器
????????///?

????????private?SqlDataAdapter?_sqlDataAdapter?=?null;

????????///?
????????///?數據庫批量操作對象
????????///?

????????private?SqlCommandBuilder?_sqlCommandBuilder?=?null;

????????///?
????????///?數據庫緩存
????????///?

????????private?DataSet?_ds?=?null;

????????///?
????????///?
????????///?

????????public?Form1()
????????{
????????????InitializeComponent();

????????????_strConnectionString?=?textBox_connectionString.Text.Trim();
????????????_sqlConnection?=?new?System.Data.SqlClient.SqlConnection(_strConnectionString);

????????????_sqlDataAdapter?=?new?SqlDataAdapter();
????????????_sqlDataAdapter.SelectCommand?=?new?SqlCommand(“SELECT?ASM_A1_10?AS?資產ID?ASM_A1_20?AS?資產編號?ASM_A1_9995?AS?日期時間?FROM?ASM_A1“?_sqlConnection);

????????????_ds?=?new?DataSet();
????????????_sqlCommandBuilder?=?new?System.Data.SqlClient.SqlCommandBuilder();
????????}

????????///?
????????///?執行增加操作
????????///?

????????private?void?DoInsert()
????????{
????????????try
????????????{
????????????????string?_id?=?string.Empty;
????????????????_id?=?textBox_id.Text.Trim();

????????????????string?_code?=?string.Empty;
????????????????_code?=?textBox_code.Text.Trim();

????????????????string?_datetime?=?string.Empty;
????????????????_datetime?=?textBox_dt.Text.Trim();

????????????????if?(string.IsNullOrEmpty(_code)
????????????????????||string.IsNullOrEmpty(_datetime))
????????????????{
????????????????????MessageBox.Show(“請輸入完整!“);
????????????????????return;
????????????????????
????????????????}

????????????????if?(CheckCode(_code))
????????????????{
????????????????????MessageBox.Show(“資產編號重復!“);

????????????????????textBox_code.Focus();
????????????????????textBox_code.SelectAll();
????????????????????
????????????????????return;
????????????????}

????????????????_id?=?GetMaxId();

????????????????SaveData(_id?_code?_datetime);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????throw?ex;
????????????}????????
????????}

????????///?
????????///?獲取資產ID最大值
????????///?

????????///?
????????private?string?GetMaxId()
????????{
????????????string?_strResult?=?string.Empty;

????????????try
????????????{
????????????????using?(SqlConnection?_sqlConnection?=?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-12-06?13:49??LoginDataServer\
?????文件????????1101??2011-12-01?13:52??LoginDataServer.sln
?????文件???????17408??2011-12-06?13:54??LoginDataServer.suo
?????文件????????1406??2011-12-06?13:40??LoginDataServer\App.ico
?????目錄???????????0??2011-12-06?13:40??LoginDataServer\bin\
?????目錄???????????0??2011-12-06?13:49??LoginDataServer\bin\Debug\
?????文件???????19456??2011-12-06?13:49??LoginDataServer\bin\Debug\LoginDataServer.exe
?????文件???????32256??2011-12-06?13:49??LoginDataServer\bin\Debug\LoginDataServer.pdb
?????文件??????191248??2005-09-03?06:55??LoginDataServer\bin\Debug\System.Data.SqlClient.dll
?????文件?????????108??2005-07-15?22:35??LoginDataServer\bin\Debug\System.Data.SqlClient.xml
?????文件???????18091??2011-12-06?13:49??LoginDataServer\Form1.cs
?????文件???????10686??2011-12-06?13:35??LoginDataServer\Form1.Designer.cs
?????文件????????6298??2011-12-06?13:35??LoginDataServer\Form1.resx
?????文件????????4302??2011-12-06?13:48??LoginDataServer\LoginDataServer.csproj
?????文件?????????236??2011-12-02?09:44??LoginDataServer\LoginDataServer.csproj.user
?????目錄???????????0??2011-12-01?13:52??LoginDataServer\obj\
?????目錄???????????0??2011-12-06?13:49??LoginDataServer\obj\Debug\
?????文件????????1398??2011-12-06?13:49??LoginDataServer\obj\Debug\LoginDataServer.csproj.FileListAbsolute.txt
?????文件?????????847??2011-12-06?13:49??LoginDataServer\obj\Debug\LoginDataServer.csproj.GenerateResource.Cache
?????文件???????19456??2011-12-06?13:49??LoginDataServer\obj\Debug\LoginDataServer.exe
?????文件?????????180??2011-12-06?13:49??LoginDataServer\obj\Debug\LoginDataServer.Form1.resources
?????文件???????32256??2011-12-06?13:49??LoginDataServer\obj\Debug\LoginDataServer.pdb
?????文件?????????180??2011-12-06?13:49??LoginDataServer\obj\Debug\LoginDataServer.Properties.Resources.resources
?????目錄???????????0??2011-12-01?14:58??LoginDataServer\obj\Debug\Refactor\
?????文件????????9381??2011-12-06?13:49??LoginDataServer\obj\Debug\ResolveAssemblyReference.cache
?????目錄???????????0??2011-12-01?13:52??LoginDataServer\obj\Debug\TempPE\
?????文件?????????362??2011-12-01?13:52??LoginDataServer\Program.cs
?????目錄???????????0??2011-12-01?13:52??LoginDataServer\Properties\
?????文件????????1439??2011-12-01?13:52??LoginDataServer\Properties\AssemblyInfo.cs
?????文件????????2367??2011-12-01?13:52??LoginDataServer\Properties\Resources.Designer.cs
?????文件????????5618??2011-12-01?13:52??LoginDataServer\Properties\Resources.resx
............此處省略0個文件信息

評論

共有 條評論