Ejemplo n.º 1
0
        //发送盘点结果
        private void menuItem4_Click(object sender, EventArgs e)
        {
            //发送前先将读取标签的操作停止
            if (this.menuItem5.Checked == true)//正在循环读取标签
            {
                __timer.Enabled = false;
                this.menuItem5.Checked = false;
            }

            string strTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            List<tagID> list = new List<tagID>();
            foreach (System.Windows.Forms.ListViewItem lvi in this.listView1.Items)
            {
                if (lvi.Checked == true)
                {
                    tagID tag1 = new tagID(lvi.Text, strTime, InventoryCommand.盘点);
                    list.Add(tag1);
                }
            }

            string jsonString = tagID.toJSONFromList(list);
            HttpWebConnect helper = new HttpWebConnect();
            helper.RequestCompleted += new deleGetRequestObject(helper_RequestCompleted);
            string url = RestUrl.addScanedTags;
            helper.TryPostData(url, jsonString);
        }
Ejemplo n.º 2
0
 private void menuItem2_Click(object sender, EventArgs e)
 {
     HttpWebConnect helper = new HttpWebConnect();
     string url = RestUrl.getProductInfoForInventoryList;
     helper.RequestCompleted += new deleGetRequestObject(helper_RequestCompleted_getProductInfoForInventoryList);
     helper.TryRequest(url);
     return;
 }