Beispiel #1
0
        private void frmOrderProductsCollections_Load(object sender, EventArgs e)
        {
            try
            {
                //Obtain information about the scenario by ID
                mySce.GetScenarioByID(clsGlobals.GIPar.ScenarioID);
                clsGlobals.GIPar.SeasonID = mySce.GISeasonID;

                //Obtain size information by product and scenario
                lstSCSales.GetSalesHistoryByID(clsGlobals.GIPar.ScenarioID, clsGlobals.GIPar.ProductColorID);

                //Get Product Information SCProduct
                myScP.GetScProduct(clsGlobals.GIPar.ScenarioID, clsGlobals.GIPar.ProductColorID);
                clsGlobals.ActiveRatio = clsGlobals.BkRatio;

                //Rate update
                if (myScP.SurplusRate == 0)
                {
                    myScP.SurplusRate = clsGlobals.ActiveRatio;
                }
                else
                {
                    clsGlobals.ActiveRatio = myScP.SurplusRate;
                }

                //Filling combobox
                LoadComboBoxes();

                //Generates and calculates product information from 4017
                GenerateOrderedProductsList();

                //Copy general parameters to text
                GIParametersToText();

                //Desactiva controles
                DeactivateControls();

                //Configura datagridview
                ConfigureDataView();

                if (myScP.VOStatus == 2)
                {
                    chkNotGenerateVO.Checked = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Beispiel #2
0
        private void UpdateItems(clsProductEqui myPeq, int numberSeasons)
        {
            clsListScSalesHistory myProductBase = new clsListScSalesHistory();

            myProductBase.GetSalesHistoryByID(clsGlobals.GIPar.ScenarioID, clsProduct.GetProductColorIDFromGIProductID(myPeq.ProductBaseID));
            foreach (clsScSalesHistory ele in myProductBase.Elements)
            {
                if (numberSeasons == 2)
                {
                    ele.UpdateTwoItems(myPeq.ProductEquiID);
                }
                else
                {
                    ele.UpdateOneItems(myPeq.ProductEquiID);
                }
            }
        }