Exemplo n.º 1
0
        private bool LoadTabletblGIScSalesHistory(int nextScenarioID, int gISeasonID)
        {
            clsSeason mySea = new clsSeason();

            mySea.GetSeasonByID(gISeasonID);
            try
            {
                if (clsGlobals.SecondSeasonID > 99 && clsGlobals.OriginOfStoredProc == 1)
                {
                    clsSeason mySSea = new clsSeason();
                    mySSea.GetSeasonByID(clsGlobals.SecondSeasonID);
                    clsGlobals.SecondSeasonID = mySSea.SXSeasonID;
                }
                else
                {
                    clsGlobals.SecondSeasonID = -1;
                }
                clsSilex.RunStoredProcedure(nextScenarioID, mySea.SXSeasonID, clsGlobals.SecondSeasonID, mySea.SXSeasonPrecID);
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 private void cboScenario_SelectedIndexChanged(object sender, EventArgs e)
 {
     scenarioID = Convert.ToInt32(cboScenario.SelectedValue);
     cont++;
     mySce.GetScenarioByID(scenarioID);
     dgvResult.DataSource = clsListScProduct.GetListVOToPrint(scenarioID);
     try
     {
         mySea.GetSeasonByID(mySce.VOSeasonID);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 3
0
        private void UpdateEquivalentProducts()
        {
            int numberSeasons = 0;

            lstPequ.GetAllEquivalentProducts();
            foreach (clsProductEqui myPeq in lstPequ.Elements)
            {
                clsSeason seasonScenario = new clsSeason();
                clsSeason seasonPeque    = new clsSeason();

                seasonScenario.GetSeasonByID(clsGlobals.GISeasonID);
                seasonPeque.GetSeasonByID(myPeq.SeasonID);

                numberSeasons = seasonScenario.NumberSeasons(seasonPeque);
                if (numberSeasons > 0)
                {
                    UpdateItems(myPeq, numberSeasons);
                }
            }
        }