Exemple #1
0
        // ****************************************************************************
        // Implement our own event handler so we can access TAG data in our class

        private void mcRFID_EventReadNotify(object sender, EventReadNotifyEventArgs e)
        {
            TagData[] myTags = Reader.Actions.GetReadTags(100);

            ListView lstViewData = FindViewById <ListView>(Resource.Id.listviewdata);

            RunOnUiThread(() =>
            {
                bool viewUpdated = false;

                if (myTags != null)
                {
                    for (int index = 0; index < myTags.Length; index++)
                    {
                        if (myTags[index].TagID.Substring(0, 4) == "F0C5")
                        {
                            if (!EPCExists(myTags[index].TagID))
                            {
                                if (PassFilter(myTags[index].TagID))
                                {
                                    if (scanType != "VERIFY")
                                    {
                                        if (AddEPC(myTags[index].TagID))  //Full Tag EPC Data
                                        {
                                            FoxProduct prod      = new FoxProduct();
                                            prod.EPC             = myTags[index].TagID;
                                            prod.FoxSKU          = mcTools.GetFoxSKUFromEPC(prod.EPC);
                                            prod.VendorCode      = prod.FoxSKU.Substring(0, 3);
                                            prod.Category        = prod.FoxSKU.Substring(3, 2);
                                            prod.epcLast6        = Convert.ToInt16(myTags[index].TagID.Substring(26, 6));
                                            prod.Qty             = scanQTY; // 1 = IN, -1 = OUT, 0 = CURRENT ON HAND
                                            prod.DateTimeScanned = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
                                            prod.EmployeeID      = empNo;
                                            prod.OtherStoreCode  = destStoreCode;
                                            prod.ActionWOtherLoc = toFrom;
                                            prod.NewConsol       = newConsol;
                                            viewUpdated          = true;
                                            invUpdated           = true;
                                            listFoxProducts.Add(prod);
                                        }
                                    }
                                }
                            }
                        }
                    }

                    // Update listview w/ data stored in listFoxProducts

                    if (viewUpdated)
                    {
                        RefreshView();
                    }
                }
            });
        }
Exemple #2
0
        //Delete Data Operation

        public bool removeTable(string dbFilename, FoxProduct product)
        {
            try
            {
                using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, dbFilename)))
                {
                    connection.BeginTransaction();
                    connection.Delete(product);
                    connection.Commit();
                    return(true);
                }
            }
            catch (SQLiteException ex)
            {
                Log.Info(logTag, ex.Message);
                return(false);
            }
        }
Exemple #3
0
        private void AddDummyListData()
        {
            FoxProduct fp = new FoxProduct();

            fp.FoxSKU      = "WWA12345XLS";
            fp.Color       = "Sapphire Blue";
            fp.VendorSKU   = "..C19000S-SJ545";
            fp.Price       = 1999;
            fp.Description = "Blue blouse with stringy things";

            listProducts.Add(fp);

            fp = new FoxProduct();

            fp.FoxSKU      = "WWA12502XLSM";
            fp.Color       = "Pink Blush";
            fp.VendorSKU   = "MJC12500S-SJ645";
            fp.Price       = 2999;
            fp.Description = "Pink blouse with stringy things";

            listProducts.Add(fp);
        }
        private void LoadVerifyTickets(string batchList)
        {
            InitEPCArray();
            listFoxProducts.Clear();
            listEPCsVerified.Clear();

            Message msg = new Message();

            epcLoadHandler = new EventHandlerEPCVerifyLoadComplete(this);
            msg            = epcLoadHandler.ObtainMessage();

            ProgressDialog progBar = new ProgressDialog(this);

            progBar.SetCancelable(false);
            progBar.SetTitle("Retrieving Ticket Data...");
            progBar.SetIcon(Resource.Drawable.iconChill64);
            progBar.SetMessage("Importing Ticket Info...");
            progBar.SetProgressStyle(ProgressDialogStyle.Spinner);
            progBar.Progress = 0;
            progBar.Show();

            var thread = new System.Threading.Thread(new ThreadStart(delegate
            {
                try
                {
                    FoxScannerSvc.FoxScannerSvc foxSql = new FoxScannerSvc.FoxScannerSvc();
                    string epcList = foxSql.GetRFIDEPCsfromBatchList(batchList);

                    if (epcList != "")
                    {
                        string[] epcArray = epcList.Split(',');

                        for (int i = 0; i <= epcArray.GetUpperBound(0); i++)
                        {
                            if (epcArray[i] != "")
                            {
                                //AddEPC(epcArray[i]);

                                FoxProduct prod = new FoxProduct();
                                prod.EPC        = epcArray[i];
                                prod.FoxSKU     = mcTools.GetFoxSKUFromEPC(prod.EPC);
                                prod.VendorCode = prod.FoxSKU.Substring(0, 3);
                                prod.Category   = prod.FoxSKU.Substring(3, 2);
                                prod.epcLast6   = Convert.ToInt16(epcArray[i].Substring(26, 6));
                                prod.Qty        = 1; // 1 = IN, -1 = OUT, 0 = CURRENT ON HAND

                                listFoxProducts.Add(prod);

                                // Below does not pertain to inv tix verification

                                //prod.ActionWOtherLoc = toFrom;
                                //prod.NewConsol = newConsol;
                                //prod.OtherStoreCode = destStoreCode;
                                //prod.DateTimeScanned = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString();
                                //prod.EmployeeID = empNo;
                            }
                        }
                    }

                    RunOnUiThread(() =>
                    {
                        progBar.Dismiss();
                    });

                    msg.Arg1 = 0;
                    epcLoadHandler.SendMessage(msg);
                }
                catch (Exception ex)
                {
                    msg.Arg1 = 1;
                    epcLoadHandler.SendMessage(msg);
                }
            }));

            thread.Start();
        } // LoadVerifyTickets()