91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

使用sqlserver數據庫,VS2013,生成的二維碼支持中文,內有說明文檔...................................................................

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Data.SqlClient;
using?System.Drawing;
using?System.IO;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?ThoughtWorks.QRCode.Codec;

namespace?WindowsFormsApplication1
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?btnWrite_Click(object?sender?EventArgs?e)
????????{
????????????string?strConn?=?““;
????????????strConn?=?“server?=?.;?database?=?Test;?uid?=?sa;?pwd?=?123456;?“;?//數據庫的鏈接字符串
????????????SqlConnection?cnn;//定義數據庫的鏈接
????????????SqlCommand?cmd;//定義操作

????????????string?strSql?=?““;
????????????string?strQRCodeContent?=?““;//要生成二維碼的內容的匯總
????????????string?orderNo?orderInfo;

????????????orderNo?=?TextBox1.Text;
????????????orderInfo?=?TextBox2.Text;

????????????strQRCodeContent?=?orderNo?+?““?+?orderInfo;
????????????strSql?=?@“insert?into?AcceptOrder(OrderNoOrderInfoQRCode)?values(@OrderNo@OrderInfo@PhotoBinary)“;

????????????byte[]?QRCodeByte?=?setQRCode(strQRCodeContent.Trim()?2?PictureBox1);

????????????cnn?=?new?SqlConnection(strConn);?//創建鏈接
????????????cmd?=?new?SqlCommand(strSql?cnn);

????????????cmd.Parameters.Add(“@OrderNo“?SqlDbType.VarChar);
????????????cmd.Parameters[“@OrderNo“].Value?=?orderNo;
????????????cmd.Parameters.Add(“@OrderInfo“?SqlDbType.VarChar);
????????????cmd.Parameters[“@OrderInfo“].Value?=?orderInfo;
????????????cmd.Parameters.Add(“@PhotoBinary“?SqlDbType.Binary?QRCodeByte.Length);
????????????cmd.Parameters[“@PhotoBinary“].Value?=?QRCodeByte;

????????????cmd.Connection.Open();
????????????cmd.ExecuteNonQuery();
????????????cmd.Connection.Close();
????????}

????????///?
????????///?創建生成二維碼圖片得到二維碼保存路徑的字節
????????///?

????????///?生成二維碼的內容
????????///?生成二維碼圖片的大小
????????///?用來加載顯示二維碼圖片的控件
????????///?返回保存二維碼圖片的路徑的字節
????????///?創建生成二維碼圖片得到二維碼保存路徑的字節
????????public?byte[]?setQRCode(string?strData?int?scale?PictureBox?pictureImage)
????????{
????????????string[]?str;
????????????Image?mying;
????????????QRCodeEncoder?qRCodeEncoder?=?new?QRCodeEncoder();
????????????string?path?=?Application.StartupPath;//相對存儲圖片路徑
????????????FileStream?fs?=?null;
????????????qRCodeEncoder.QRCodeScale?=?Convert.ToInt16(scale);//指定生成的二維碼?圖片的大小
????????????mying?=?qRCodeEncoder.Encode(strData?System.Text.Encoding.UTF8);//將指定內容生成二維碼圖片,編譯格式為utf8?可以編譯中文
????????????str?=?strData.Split(‘‘);

????????????string?paths?=?path?+?@“\QRCode\“;
????????????if?(!Directory.Exists(paths))
????????????{
????????????????Directory.CreateDirectory(paths);
????????????}

????????????string?filePath?=?paths?+?str[0]?+?“.Bmp“;
????????????mying

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-01-20?09:41??水晶報表打印二維碼\
?????目錄???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\
?????目錄???????????0??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\
?????文件?????????187??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\App.config
?????目錄???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\
?????目錄???????????0??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\
?????目錄???????????0??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\QRCode\
?????文件???????33178??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\QRCode\阿斯達.Bmp
?????文件?????6209536??2011-09-29?05:20??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\ThoughtWorks.QRCode.dll
?????文件???????11264??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
?????文件?????????187??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
?????文件???????22016??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
?????文件???????24224??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
?????文件?????????187??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
?????文件?????????490??2013-03-19?08:00??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
?????文件????????3749??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
?????文件????????4773??2016-01-20?09:25??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
?????文件????????5817??2016-01-20?09:25??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
?????目錄???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\
?????目錄???????????0??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\
?????文件????????7172??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
?????目錄???????????0??2016-01-20?09:24??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\TempPE\
?????文件????????1059??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
?????文件?????????977??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
?????文件????????6554??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache
?????文件???????11264??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
?????文件?????????180??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
?????文件???????22016??2016-01-20?09:27??水晶報表打印二維碼\WindowsFormsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
............此處省略12個文件信息

評論

共有 條評論