Exemplo n.º 1
0
        public List <UpcInventory> fillUPCsInventory(ProductsList productlist)
        {
            String                   upc = "";
            UpcInventory             UpcObject;
            List <UpcInventory>      UpcList      = new List <UpcInventory>();
            List <UpcInventory>      UpcFinalList = new List <UpcInventory>();
            Dictionary <String, int> UpcIndex     = new Dictionary <string, int>();

            foreach (Product prod in productlist.getAll())
            {
                UpcObject = new UpcInventory(prod.upc, prod.product_name);
                UpcIndex.Add(prod.upc, UpcList.Count);
                UpcList.Add(UpcObject);
            }

            foreach (DictionaryEntry item in m_TagTable)
            {
                upc = EpcTools.getUpc(item.Value.ToString());
                UpcList[UpcIndex[upc]].total++;
            }

            foreach (UpcInventory UpcO in UpcList)
            {
                if (UpcO.total != 0)
                {
                    UpcFinalList.Add(UpcO);
                }
            }
            return(UpcFinalList);
        }
Exemplo n.º 2
0
 private void SyncPicture_Click(object sender, EventArgs e)
 {
     formsync.Show();
     //if (!sync.GET())
     //    return;
     products = new ProductsList(pathFolderName + "products.csv");
     //products_bar = new ProductsList(@"\rfiddata\products_bar.csv");
     warehouses = new Warehouses(pathFolderName + "warehouses.csv");
     if (sync.POSTTrans(formsync, configData.id_user, configData.pwd, configData.id_client))
     {
         MessageBox.Show("Sincronización exitosa", "Sincronización");
     }
     formsync.Hide();
 }
Exemplo n.º 3
0
        public MenuForm()
        {
            InitializeComponent();
            //Set Config Data
            pathFolderName   = getNameFolderVersion();
            configData       = Config.getConfig(pathFolderName + "config.json");
            ftpConfig        = FtpConfig.getConfig(pathFolderName + "ftp.json");
            idClient         = configData.id_client;
            showCaptureFolio = true;
            //Set Synchronization
            sync           = new Sync(configData.url, idClient, pathFolderName);
            sync.conection = sync.GETTest();
            if (sync.conection)
            {
                sync.GET();
            }
            //Set Reader
            rrfid = new SimpleRFID();
            //rrfid.changeEPC("30342848A80A5AC0000007D9", "30342848A80A5A400001000A");
            //Set Catalogs
            products   = new ProductsList(pathFolderName + "products.csv");
            warehouses = new Warehouses(pathFolderName + "warehouses.csv");

            //Set Forms
            reports     = new InventoryReportFrm(this);
            search      = new SearchForm(this);
            upcsearch   = new UPCSearchForm(this, pathFolderName);
            locate      = new LocateForm(this);
            formsync    = new SyncForm(this);
            orderreport = new OrderExitReportForm(this);
            frmEditText = new EditTextForm(this, pathFolderName + "config.json");
            this.setColors(configData);

            /*
             * Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(@"\rfiddata\img\logo.bmp");
             * Image image = new Bitmap(stream);
             * LogoPicture.Image = image;
             */

            string myDir = Path.GetDirectoryName(Assembly.GetCallingAssembly().GetName().CodeBase);

            myResDir = Path.Combine(myDir, pathFolderName + "img");
            Image image;

            image                        = new Bitmap(Path.Combine(myResDir, "logo_hqh_med.bmp"));
            LogoPicture.Image            = image;
            image                        = new Bitmap(Path.Combine(myResDir, "menu1.bmp"));
            ReaderPicture.Image          = image;
            image                        = new Bitmap(Path.Combine(myResDir, "menu2.bmp"));
            ReportPicture.Image          = image;
            image                        = new Bitmap(Path.Combine(myResDir, "menu3.bmp"));
            SearchPicture.Image          = image;
            image                        = new Bitmap(Path.Combine(myResDir, "menu4.bmp"));
            SyncPicture.Image            = image;
            image                        = new Bitmap(Path.Combine(myResDir, "menu5_export.bmp"));
            OrderExitPicture.Image       = image;
            image                        = new Bitmap(Path.Combine(myResDir, "menu6.bmp"));
            OrderExitReportPicture.Image = image;
            //image = new Bitmap(Path.Combine(myResDir, "exit.bmp"));
            //ExitPicture.Image = image;
        }