示例#1
0
        private void btnRecord_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidateChildren(ValidationConstraints.Enabled))
                {
                    clsGlobals.GIPar.GetVOParameters();
                    aDiv = TextToScenario();
                    clsGlobals.NextScenarioID     = clsScenario.NextScenarioID();
                    clsGlobals.GISeasonID         = aDiv.GISeasonID;
                    clsGlobals.OriginOfStoredProc = 1;

                    //abre formulario de espera
                    if (clsFrmGlobals.frES == null)
                    {
                        clsFrmGlobals.frES             = new frmExecutionStoredProcedure();
                        clsFrmGlobals.frES.MdiParent   = this.MdiParent;
                        clsFrmGlobals.frES.FormClosed += new FormClosedEventHandler(frESFromClosed);
                        clsFrmGlobals.frES.Show();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#2
0
        private void btnRecord_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidateChildren(ValidationConstraints.Enabled))
                {
                    clsGlobals.GIPar.GetVOParameters();
                    aDiv = TextToScenario();
                    clsGlobals.NextScenarioID     = clsScenario.NextScenarioID();
                    clsGlobals.GISeasonID         = aDiv.GISeasonID;
                    clsGlobals.OriginOfStoredProc = 1;

                    //abre formulario de espera
                    MessageBox.Show("La création du scénario peut prendre quelques minutes...");
                    if (LoadTabletblGIScSalesHistory(clsGlobals.NextScenarioID, clsGlobals.GISeasonID))
                    {
                        clsGlobals.Flag = true;
                    }
                    else
                    {
                        clsGlobals.Flag = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#3
0
        private clsScenario TextToScenario()
        {
            clsScenario mySce = new clsScenario();

            mySce.GIScenarioID   = clsGlobals.GIPar.ScenarioID;
            mySce.ScenarioDesc   = txtDesc.Text;
            mySce.ScenarioStatus = Convert.ToInt32(cboStatus.SelectedValue);

            mySce.CollectionID       = Convert.ToInt32(cboCollection.SelectedValue);
            mySce.DefaultWarehouseID = Convert.ToInt32(cboWhs.SelectedValue);;
            mySce.DivisionID         = Convert.ToInt32(cboDivision.SelectedValue);
            mySce.ExpArrivalDate     = dtpArrivalDate.Value;
            mySce.ExpShippingDate    = dtpShipDate.Value;
            mySce.GIScenarioID       = clsGlobals.GIPar.ScenarioID;
            mySce.PurchaseTypeID     = Convert.ToInt32(cboPurchaseType.SelectedValue);;
            mySce.ReferenceNo1       = txtRef1.Text;
            mySce.ReferenceNo2       = txtRef2.Text;
            mySce.ScenarioDesc       = txtDesc.Text;
            mySce.ScenarioStatus     = Convert.ToInt32(cboStatus.SelectedValue);
            mySce.VendorID           = Convert.ToInt32(cboBillFrom.SelectedValue);
            mySce.VendorSiteID       = eleShip.GetVendorSiteID(mySce.VendorID);
            mySce.VOMessage          = txtVOMessage.Text;
            mySce.VONote             = txtVONote.Text;
            mySce.VOSeasonID         = Convert.ToInt32(cboSeason.SelectedValue);
            return(mySce);
        }
示例#4
0
        private clsScenario TextToScenario()
        {
            clsScenario aTem = new clsScenario();

            aTem.ScenarioCode = Convert.ToString(txtCode.Text);
            aTem.GISeasonID   = Convert.ToInt32(cboCurrentSaison.SelectedValue);

            return(aTem);
        }
示例#5
0
        private clsScenario TextToScenario()
        {
            clsScenario aTem = new clsScenario();

            aTem.ScenarioCode         = Convert.ToString(txtCode.Text);
            aTem.ScenarioDesc         = Convert.ToString(txtDesc.Text);
            aTem.ScenarioStatus       = Convert.ToInt32(cboStatus.SelectedValue);
            aTem.GISeasonID           = Convert.ToInt32(cboCurrentSaison.SelectedValue);
            clsGlobals.SecondSeasonID = chkSecondSeason.Checked ? Convert.ToInt32(cboSecondSeason.SelectedValue) : -1;

            return(aTem);
        }
示例#6
0
 private void ScenarioTotext(clsScenario Sce)
 {
     clsGlobals.mySea               = lstSea.GetSeasonByID(Sce.GISeasonID);
     txtCode.Text                   = Convert.ToString(Sce.ScenarioCode);
     txtCreatedD.Text               = Convert.ToString(Sce.CreatedDate);
     txtCreatedU.Text               = Convert.ToString(Sce.CreatedByUserID);
     txtDesc.Text                   = Convert.ToString(Sce.ScenarioDesc);
     txtModifiedD.Text              = Convert.ToString(Sce.ModifiedDate);
     txtModifiedU.Text              = Convert.ToString(Sce.ModifiedByUserID);
     cboStatus.SelectedIndex        = Sce.ScenarioStatus;
     cboCurrentSaison.SelectedValue = clsGlobals.mySea.GISeasonID;
     txtPreviousSeason.Text         = clsGlobals.mySea.SeasonPrecName;
     txtModifiedU.Text              = clsUser.GetUserName(Sce.ModifiedByUserID);
     txtCreatedU.Text               = clsUser.GetUserName(Sce.CreatedByUserID);
 }
示例#7
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try
     {
         clsScenario mySce = new clsScenario();
         mySce = TextToScenario();
         mySce.UpdateScenario();
         MessageBox.Show("Les modifications ont été enregistrées");
         LoadScenarioInformation();
         DeactivateControls();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#8
0
 private void dgvResult_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         clsScenario mySce = new clsScenario();
         mySce.GetScenarioByID(clsGlobals.GIPar.ScenarioID);
         clsGlobals.GIPar.ProductColorID = Convert.ToInt32(dgvResult.CurrentRow.Cells[0].Value);
         clsGlobals.ActiveRatio          = mySce.SurplusRateIdentified;
         clsGlobals.BkRatio         = mySce.SurplusRateIdentified;
         clsGlobals.CollectionsFlag = true;
         if (frOP == null)
         {
             frOP             = new frmOrderProductsCollections();
             frOP.MdiParent   = this.MdiParent;
             frOP.FormClosed += new FormClosedEventHandler(frOPFromClosed);
             frOP.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }