Ejemplo n.º 1
0
 private void SyncPicture_Click(object sender, EventArgs e)
 {
     frmsync.Show();
     products = new AssetsList(pathFolderName + "products.csv");
     //products_bar = new ProductsList(@"\rfiddata\products_bar.csv");
     warehouses = new Warehouses(pathFolderName + "warehouses.csv");
     if (sync.POSTTrans(frmsync, configData.id_user, configData.pwd, configData.id_client))
     {
         MessageBox.Show("Sincronización exitosa", "Sincronización");
     }
     frmsync.Hide();
 }
Ejemplo n.º 2
0
        public MenuForm()
        {
            InitializeComponent();
            //Set Config Data
            configInvent   = ConfigInventory.getConfigInventory(@"\rfiddata\config_inventory.json");
            pathFolderName = getNameFolderVersion(configInvent.version);
            configData     = Config.getConfig(pathFolderName + "config.json");
            idClient       = configData.id_client;
            //Set Synchronization
            sync = new Sync(configData.url, idClient, pathFolderName);
            //sync.GET_Test();
            sync.GET();
            //Set Reader
            rrfid = new SimpleRFID();
            //Set Catalogs
            products   = new AssetsList(pathFolderName + "products.csv");
            warehouses = new Warehouses(pathFolderName + "warehouses.csv");
            if (warehouses.collection.Count == 0)
            {
                MessageBox.Show("Agregar zona", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
                Application.Exit();
            }
            if (configInvent.version == 3)
            {
                configData.id_warehouse = warehouses.collection[0].id;
            }
            //Set Current Event Data
            frmInventory = new InventoryForm(this);
            reports      = new InventoryReportFrm(this);
            search       = new SearchForm(this);
            upcsearch    = new UPCSearchForm(this);
            locate       = new LocateForm(this);
            frmsync      = new SyncForm(this);
            frmListAsset = new ListAssetsForm(this);
            frmEditText  = new EditTextForm(this, pathFolderName + "config.json",
                                            @"\rfiddata\config_inventory.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;
            if (configInvent.version == 2)
            {
                image = new Bitmap(Path.Combine(myResDir, "InventTotal.png"));
                InventoryPicture.Image = image;
            }
        }
Ejemplo 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;
        }