public StorageDataEditForm(RPN_API_Web web, int storage_id, int storage_data_id)
        {
            InitializeComponent();
            Icon = Resources.RPN_Sharp;

            if (Program.IsFullscreen)
            {
                WindowState = FormWindowState.Maximized;
            }

            storageDataFormSkin.FlatColor = Program.UIColor;

            ressourceTypeFlatComboBox.HoverColor = Program.UIColor;
            belongtoFlatComboBox.HoverColor      = Program.UIColor;

            this.web             = web;
            this.storage_id      = storage_id;
            this.storage_data_id = storage_data_id;


            foreach (RPN_API_Json.RessourceTypeData ressourceTypeData in web.GetRessourceType())
            {
                ressourceTypeFlatComboBox.Items.Add(ressourceTypeData.Name);
            }

            foreach (RPN_API_Json.InternalData internalData in web.GetAllUsers())
            {
                belongtoFlatComboBox.Items.Add(internalData.Username);
            }

            if (storage_data_id != -1)
            {
                RPN_API_Json.StorageData       currentStorageData   = web.GetStorageDataFromId(storage_data_id);
                RPN_API_Json.RessourceTypeData currentRessourceType = web.GetRessourceTypeFromId(currentStorageData.RessourceType);
                RPN_API_Json.InternalData      currentBelongTo      = web.GetUser(currentStorageData.BelongTo);

                foreach (RPN_API_Json.RessourceTypeData ressourceTypeData in web.GetRessourceType())
                {
                    if (currentRessourceType.Name.Equals(ressourceTypeData.Name, StringComparison.InvariantCultureIgnoreCase))
                    {
                        ressourceTypeFlatComboBox.Text = ressourceTypeData.Name;
                    }
                }

                foreach (RPN_API_Json.InternalData internalData in web.GetAllUsers())
                {
                    if (currentBelongTo.Username.Equals(internalData.Username, StringComparison.InvariantCultureIgnoreCase))
                    {
                        belongtoFlatComboBox.Text = internalData.Username;
                    }
                }

                quantityNumericUpDown.Value = currentStorageData.Quantity;
            }
        }
        private void storageDetailDataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (storageDetailDataGridView.SelectedCells.Count > 0)
            {
                int storage_data_id = int.Parse(storageDetailDataGridView.Rows[storageDetailDataGridView.SelectedCells[0].RowIndex].Cells[0].Value.ToString());

                RPN_API_Json.StorageData storageData = web.GetStorageDataFromId(storage_data_id);

                RPN_API_Json.RessourceTypeData ressourceType = web.GetRessourceTypeFromId(storageData.RessourceType);
                quantityFlatLabel.Text  = "Quantité : " + storageData.Quantity.ToString("N0");
                unitPriceFlatLabel.Text = "Prix Unitaire : " + ressourceType.Price.ToString("C0");
                rentFlatLabel.Text      = (storageData.Quantity * ressourceType.Price).ToString("C0");
                belongToFlatLabel.Text  = storageData.BelongTo;
            }
        }