久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 5392|回復: 8
打印 上一主題 下一主題
收起左側

基于RFID的便利超市防盜系統(tǒng)設計 附C#源碼與PPT

[復制鏈接]
跳轉到指定樓層
樓主
ID:402683 發(fā)表于 2018-9-26 15:12 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
簡單的C# RFID標簽系統(tǒng)PPT內容:


首先要將需要定位監(jiān)控的物資上面安裝一張半有源RFID的低頻激活電子標簽該標簽具有唯一的編碼,并給具有合法拿取物品的管理人員登記和發(fā)放一個電子標簽卡,用于標識管理人員的身份,然后將物資放置在雙頻報警主機有效監(jiān)控范圍內的指定位置上,并建立起物資與存放位置之間的對應關系。系統(tǒng)工作時,雙頻報警主機內的低頻觸發(fā)激活器連續(xù)不斷發(fā)射低頻激活信號,激活貴重物品上的電子標簽,電子標簽把信號再發(fā)射出去,有效識別范圍內的讀寫器將收到該標簽同頻段發(fā)射的數(shù)據(jù)包,解析出該數(shù)據(jù)包中的標簽ID號和激活器編號以及RSSI值后立刻上傳到上位機電腦。當貴重物品上的標簽被移出2m外,激活器發(fā)射的信號不能激活標簽,相對應讀寫器也讀取不了標簽信息,聲光報警裝置進行報警。同時,在倉庫不同的地方,安裝一些有源RFID遠距離讀寫器,用于采集低頻激活電子標簽被激活后發(fā)出的信息(包括電子標簽本身的ID號,低頻激活天線的地址碼),讀寫器采集到數(shù)據(jù)后,通過各種傳輸方式,將信息上傳給電腦管理中心。以便及時發(fā)現(xiàn)異常和采取措施。


遇到的問題和需要討論的問題
在解決報警問題上,不知道怎樣處理。當激活器發(fā)射的信號不能激活標簽,相對應讀寫器也讀取不了標簽信息,聲光報警裝置進行報警。所以就設定當取值為空時報警器報警。
由于條件限制,讀卡距離較近,還不能很好的起到實時防盜的作用。但實驗表明,此設計的電路運行穩(wěn)定,讀寫數(shù)據(jù)準確,操作時間較短,在理論上是完全可以實現(xiàn)的。



1、管理人員可以根據(jù)用戶名和密碼登錄超市防盜系統(tǒng)

2、讀寫器采集到數(shù)據(jù)后,將信息上傳給電腦管理中心。管理人員可以知道這箱貨物的名字、生產地、生廠商編號、數(shù)量和生產日期等基本信息,并寫入數(shù)據(jù)庫中。

3、當激活器發(fā)射的信號不能激活標簽,不能正常顯示出信息。相對應讀寫器也讀取不了標簽信息,聲光報警裝置進行報警。



c#源程序如下:
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Data.SqlClient;

  10. namespace RFID
  11. {
  12.     public partial class DataConveyForm : Form
  13.     {
  14.         
  15.         public DataConveyForm()
  16.         {
  17.             InitializeComponent();
  18.         }

  19.         /*****************屏蔽窗體右上角關閉按鈕******************/
  20.         private const int CP_NOCLOSE_BUTTON = 0x200;
  21.         protected override CreateParams CreateParams
  22.         {
  23.             get
  24.             {
  25.                 CreateParams myCp = base.CreateParams;
  26.                 myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON;
  27.                 return myCp;
  28.             }
  29.         }
  30.         /*************************************************************/



  31.         /******************退出數(shù)據(jù)傳送窗口,返回到監(jiān)控窗口****************************/
  32.         private void button3_Click(object sender, EventArgs e)
  33.         {
  34.             serialPort1.Close();
  35.             MonitoringForm monitoringform = new MonitoringForm();
  36.             this.Close();
  37.             monitoringform.Show();
  38.         }

  39.         private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  40.         {
  41.             switch(comboBox2.SelectedIndex )
  42.             {
  43.                 case 0:
  44.                     comboBox2.Items.Clear();
  45.                     comboBox2.Items.Add("甘肅");
  46.                     comboBox2.Items.Add("遼寧");
  47.                     comboBox2.Items.Add("陜西");
  48.                     comboBox2.Items.Add("湖南");
  49.                     comboBox2.Items.Add("北京");
  50.                     break;
  51.             }
  52.         }
  53.         /***********************************************************************************************/



  54.         /******************************將學生信息插入到數(shù)據(jù)庫中***************************************************/

  55.         
  56.         
  57.         
  58.         /*private void button1_Click(object sender, EventArgs e)
  59.         {
  60.             if (textBox1.Text.Length == 0 | comboBox2.Text.Length == 0 | textBox3.Text.Length == 0 | textBox4.Text.Length == 0 | textBox5.Text.Length == 0 | textBox6.Text.Length == 0|comboBox2.Text.Length ==0|comboBox2.Text.Length ==0)
  61.             {
  62.                 MessageBox.Show("學生信息輸入不完整,請檢查準確輸入");
  63.                 return;
  64.             }
  65.             string sqlCheck = "SELECT count ( * ) FROM [StudentMsg] WHERE StudentId='" +textBox5.Text.ToString().Trim() + "'";
  66.             SqlConnection conn = new SqlConnection(connstring);
  67.             SqlCommand cmdCheck = new SqlCommand(sqlCheck, conn);
  68.             int checkCount = 0;

  69.             try
  70.             {
  71.                 conn.Open();
  72.                 checkCount = (int)cmdCheck.ExecuteScalar();
  73.             }
  74.             catch (Exception ex)
  75.             {
  76.                 MessageBox.Show(ex.Message);
  77.             }

  78.             if (checkCount > 0)
  79.             {
  80.                 conn.Close();
  81.                 MessageBox.Show("此學號在后臺數(shù)據(jù)庫中已經存在,學號不能重復,請重新輸入,注意只能輸入數(shù)字");
  82.                 return;
  83.             }

  84.             string dept = comboBox2.SelectedItem.ToString();    //學院
  85.             string spec = comboBox2.SelectedItem.ToString();    //專業(yè)
  86.             string sql = String.Format("INSERT INTO StudentMsg(Department,StudentId,Name,Sex,Grade,DormitoryId,Speciality,ObjectId,HostId)VALUES('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')", dept, textBox5.Text, textBox1.Text, sex, comboBox2.Text, textBox6.Text, spec, textBox3.Text, textBox4.Text);
  87.             using (SqlConnection conn1 = new SqlConnection(connstring))
  88.             {
  89.                 conn.Close();
  90.                 conn1.Open();
  91.                 SqlCommand comm = new SqlCommand(sql, conn1);
  92.                 int n = comm.ExecuteNonQuery();
  93.                 if (n > 0)
  94.                 {
  95.                     MessageBox.Show("添加學生信息成功!", "添加成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
  96.                     conn1.Close();
  97.                     this.textBox1.Text = "";
  98.                     this.comboBox2.Text = "";
  99.                     this.textBox3.Text = "";
  100.                     this.textBox4.Text = "";
  101.                     this.textBox6.Text = "";
  102.                 }
  103.                 else
  104.                 {
  105.                     MessageBox.Show("添加學生信息失敗!", "添加失敗", MessageBoxButtons.OK, MessageBoxIcon.Information);
  106.                     conn1.Close();
  107.                 }
  108.             }
  109.         }/*
  110.         /********************************************************************************************************/


  111.         /*********************************************當前顯示*************************************/
  112.         private void DataConveyForm_Load(object sender, EventArgs e)
  113.         {
  114.             try
  115.             {
  116.                 comboBox2.SelectedIndex = 0;
  117.                 comboBox2.SelectedIndex = 0;
  118.                 serialPort1.Open();
  119.             }
  120.             catch (Exception ex)
  121.             {
  122.                 MessageBox.Show(ex.Message, "串口設置操作出錯!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  123.             }
  124.         }
  125.         /************************************************************************************************/


  126.         /**********************************獲取物品標簽號***********************************************/

  127.         private void button4_Click(object sender, EventArgs e)
  128.         {
  129.             string temp;
  130.             string data;
  131.             string data1;
  132.             try
  133.             {
  134.                 serialPort1.WriteLine("010900210200040000");

  135.             }
  136.             catch (Exception ex)
  137.             {
  138.                 MessageBox.Show(ex.Message, "串口設置操作出錯!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  139.                 return;
  140.             }
  141.             temp = serialPort1.ReadLine();
  142.             System.Threading.Thread.Sleep(1000);
  143.             try
  144.             {
  145.                 serialPort1.WriteLine("010900210200040000");
  146.             }
  147.             catch (Exception ex)
  148.             {
  149.                 MessageBox.Show(ex.Message, "串口設置操作出錯!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  150.                 return;
  151.             }
  152.             data = serialPort1.ReadLine();
  153.             if (data [0]=='[')
  154.             {
  155.                 data1 = data.Substring(4, 4) + data.Substring(9, 4) + data.Substring(14, 4) + data.Substring(19, 4);
  156.                 textBox3.Text = data1;
  157.             }
  158.             else
  159.             {
  160.                 MessageBox.Show("獲取物品標簽號失敗,請注意檢查!", "獲取物品標簽失敗", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  161.             }
  162.         }
  163.         /***************************************************************************************/


  164.         /*********************************獲取主人標簽號*********************************************/
  165.         private void button5_Click(object sender, EventArgs e)
  166.         {
  167.             string temp;
  168.             string data;
  169.             string data1;
  170.             try
  171.             {
  172.                 serialPort1.WriteLine("010900210200040000");
  173.             }
  174.             catch (Exception ex)
  175.             {
  176.                 MessageBox.Show(ex.Message, "串口設置操作出錯!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  177.                 return;
  178.             }
  179.             temp = serialPort1.ReadLine();
  180.             System.Threading.Thread.Sleep(1000);
  181.             try
  182.             {
  183.                 serialPort1.WriteLine("010900210200040000");
  184.             }
  185.             catch (Exception ex)
  186.             {
  187.                 MessageBox.Show(ex.Message, "串口設置操作出錯!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  188.                 return;
  189.             }
  190.             data = serialPort1.ReadLine();
  191.             if (data[0] == '[')
  192.             {
  193.                 data1 = data.Substring(4, 4) + data.Substring(9, 4) + data.Substring(14, 4) + data.Substring(19, 4);
  194.                 textBox4.Text = data1;
  195.             }
  196.             else
  197.             {
  198.                 MessageBox.Show("獲取主人標簽號失敗,請注意檢查!", "獲取主人標簽失敗", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
  199.             }
  200.         }
  201.         private DataSet dsUser;
  202.         private void button1_Click(object sender, EventArgs e)
  203.         {
  204.             string connstring = @"Data Source=210.26.96.51;Initial Catalog=BC;User ID=sa;Pwd=95069506";
  205.             if (dsUser == null)
  206.             {
  207.                 MessageBox.Show("當前頁面數(shù)據(jù)表空,請先刷新顯示全部數(shù)據(jù),然后進行操作。");
  208.                 return;
  209.             }
  210.             if (textBox1.Text.Length == 0)
  211.             {
  212.                 MessageBox.Show("商品名稱不能為空,請輸入準確的廠商名稱!");
  213.                 return;
  214.             }
  215.             if (comboBox2.Text.Length == 0)
  216.             {
  217.                 MessageBox.Show("生產地不能為空,請輸入準確的運輸商名稱!");
  218.                 return;
  219.             }
  220.             if (textBox6.Text.Length == 0)
  221.             {
  222.                 MessageBox.Show("系統(tǒng)銷售商名稱不能為空,請輸入準確的銷售商名稱!");
  223.                 return;
  224.             }
  225.             if (numericUpDown1.Text.Length == 0)
  226.             {
  227.                 MessageBox.Show("訂單日期名稱不能為空,請輸入準確的銷售商名稱!");
  228.                 return;
  229.             }
  230.             if (dateTimePicker1.Text.Length == 0)
  231.             {
  232.                 MessageBox.Show("訂單數(shù)量不能為空,請輸入準確的銷售商名稱!");
  233.                 return;
  234.             }
  235.             string sqlCheck = "SELECT count ( * ) FROM [Store] WHERE ProName='" + textBox1.Text.ToString().Trim() + "'";
  236.             SqlConnection conn = new SqlConnection(connstring);
  237.             SqlCommand cmdCheck = new SqlCommand(sqlCheck, conn);
  238.             int checkCount = 0;

  239.             try
  240.             {
  241.                 conn.Open();
  242.                 checkCount = (int)cmdCheck.ExecuteScalar();
  243.             }
  244.             catch (Exception ex)
  245.             {
  246.                 MessageBox.Show(ex.Message);
  247.             }


  248.             sqlCheck = "INSERT INTO [Store] VALUES ('" + textBox1.Text.ToString().Trim() + "','" + comboBox2.Text.ToString().Trim() + "','" + textBox6.Text.ToString().Trim() + "','" + numericUpDown1.Text.ToString().Trim() + "','" + dateTimePicker1.Text.ToString().Trim() + "')";
  249.             try
  250.             {
  251.                 cmdCheck = new SqlCommand(sqlCheck, conn);
  252.                 cmdCheck.ExecuteNonQuery();
  253.             }
  254.             catch (Exception ex)
  255.             {
  256.                 conn.Close();
  257.                 MessageBox.Show(ex.Message);
  258.                 return;
  259.             }

  260.             sqlCheck = "SELECT '商品名'=ProName,'生產地'=Production,'生產商編號'=ProId,'購買數(shù)量'=Number,'生產日期'=DataName FROM [Store]";
  261.             try
  262.             {
  263.                 SqlDataAdapter da = new SqlDataAdapter();
  264.                 da.SelectCommand = new SqlCommand(sqlCheck, conn);

  265.                 dsUser = new DataSet("Store");
  266.                 da.Fill(dsUser, "Store");
  267.                 this.dataGridViewIndex.DataSource = dsUser.Tables["Store"];
  268.                 this.dataGridViewIndex.Refresh();
  269.                 this.dataGridViewIndex.Show();
  270.             }
  271.             catch (Exception ex)
  272.             {
  273.                 MessageBox.Show(ex.Message);
  274.             }
  275.             finally
  276.             {
  277.                 conn.Close();
  278.             }
  279.             this.textBox1.Text = "";
  280.             this.comboBox2.Text = "";
  281.             this.textBox6.Text = "";
  282.             this.numericUpDown1.Text = "";
  283.             this.dateTimePicker1.Text = "";

  284.             MessageBox.Show("數(shù)據(jù)新增完畢!");

  285.         }
  286.         private int selectRows = -1;
  287.         private string tmpProName = "";
  288.         private string tmpProduction = "";
  289.         private string tmpProId = "";
  290.         private string tmpNumber = "";
  291.         private string tmpDataName = "";
  292.         private void dataGridViewIndex_CellContentClick(object sender, DataGridViewCellEventArgs e)
  293.         {
  294.             this.selectRows = dataGridViewIndex.CurrentRow.Index;
  295.             this.textBox1.Text = dsUser.Tables["Store"].Rows[selectRows][0].ToString();
  296.             this.comboBox2.Text = dsUser.Tables["Store"].Rows[selectRows][1].ToString();
  297.             this.textBox6.Text = dsUser.Tables["Store"].Rows[selectRows][2].ToString();
  298.             this.numericUpDown1.Text = dsUser.Tables["Store"].Rows[selectRows][3].ToString();
  299.             this.dateTimePicker1.Text= dsUser.Tables["Store"].Rows[selectRows][4].ToString();
  300.             this.tmpProName = dsUser.Tables["Store"].Rows[selectRows][0].ToString();
  301.             this.tmpProduction = dsUser.Tables["Store"].Rows[selectRows][1].ToString();
  302.             this.tmpProId = dsUser.Tables["Store"].Rows[selectRows][2].ToString();
  303.             this.tmpNumber = dsUser.Tables["Store"].Rows[selectRows][3].ToString();
  304.             this.tmpDataName = dsUser.Tables["Store"].Rows[selectRows][4].ToString();
  305.         
  306.         }
  307.         /**********************************************顯示*************************************************************/
  308. ……………………

  309. …………限于本文篇幅 余下代碼請從51黑下載附件…………
復制代碼






所有資料51hei提供下載:
便利超市的防盜系統(tǒng).rar (9.95 MB, 下載次數(shù): 107)


評分

參與人數(shù) 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏2 分享淘帖 頂 踩
回復

使用道具 舉報

沙發(fā)
ID:554168 發(fā)表于 2019-6-3 21:26
能免費嘛

板凳
ID:642872 發(fā)表于 2019-11-16 14:11 | 只看該作者
大佬厲害了
回復

使用道具 舉報

地板
ID:638731 發(fā)表于 2019-12-2 15:43 | 只看該作者
RFID設備用那種能說下嘛?
回復

使用道具 舉報

5#
ID:421595 發(fā)表于 2019-12-10 14:07 | 只看該作者
看看,學習一下
回復

使用道具 舉報

6#
ID:421595 發(fā)表于 2019-12-10 14:12 | 只看該作者
樓主:能不能給出全部,好讓小弟們學習學習呀
回復

使用道具 舉報

7#
ID:421595 發(fā)表于 2019-12-16 08:17 | 只看該作者
學習一下
回復

使用道具 舉報

8#
ID:137563 發(fā)表于 2020-2-19 15:58 | 只看該作者
不錯的資料,收藏一下
回復

使用道具 舉報

9#
ID:503018 發(fā)表于 2020-4-8 12:00 | 只看該作者
感謝大佬的分享
回復

使用道具 舉報

10#
ID:546607 發(fā)表于 2020-5-20 15:23 | 只看該作者
用不了  別下  不聽的可以下載
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 国产999精品久久久影片官网 | 香蕉久久久 | 色永久| 中文字幕成人网 | 精品久久久久久久久久 | 国产精品1区 | 亚洲444kkkk在线观看最新 | 伊人伊人 | 国产乱码久久久久久 | 国产精品国产精品 | 亚洲一区在线观看视频 | 国产农村妇女毛片精品久久麻豆 | 一级毛片免费视频 | 成人福利在线视频 | 在线看黄免费 | 日韩黄色免费 | 盗摄精品av一区二区三区 | 毛片a级 | 国产精品一级在线观看 | 91精品国产91久久久久久三级 | 先锋av资源在线 | 久久久久久高潮国产精品视 | 久久视频一区 | 国产精品一区二区免费 | 免费九九视频 | 手机在线一区二区三区 | 999国产视频| 日韩中文在线视频 | 日本黄色免费视频 | 亚洲 自拍 另类 欧美 丝袜 | 日韩三级一区 | 91精品午夜窝窝看片 | 91传媒在线播放 | 久久99精品久久久久久狂牛 | 永久精品| 狠狠草视频 | 美国一级黄色片 | 日韩美女在线看免费观看 | 成人精品一区二区三区 | 久久久久国产成人精品亚洲午夜 | 成年人在线视频 |