示例#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);
            }
        }
示例#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);
     }
 }
示例#3
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);
     }
 }
示例#4
0
 private void LoadScenarioInformation()
 {
     mySce.GetScenarioByID(clsGlobals.GIPar.ScenarioID);
     lstSea.GetAllSeasons();
     mySea                         = lstSea.GetSeasonByID(mySce.GISeasonID);
     txtRef1.Text                  = mySce.ReferenceNo1;
     txtRef2.Text                  = mySce.ReferenceNo2;
     txtVOMessage.Text             = mySce.VOMessage;
     txtVONote.Text                = mySce.VONote;
     txtCode.Text                  = mySce.ScenarioCode;
     txtDesc.Text                  = mySce.ScenarioDesc;
     txtCurrentSeasons.Text        = mySea.SeasonName;
     txtSeasonsPrevious.Text       = mySea.SeasonPrecName;
     cboStatus.SelectedValue       = mySce.ScenarioStatus;
     cboBillFrom.SelectedValue     = mySce.VendorID.ToString();
     cboCollection.SelectedValue   = mySce.CollectionID.ToString();
     cboDivision.SelectedValue     = mySce.DivisionID.ToString();
     cboPurchaseType.SelectedValue = mySce.PurchaseTypeID.ToString();
     cboSeason.SelectedValue       = mySce.GISeasonID;
     cboWhs.SelectedValue          = mySce.DefaultWarehouseID.ToString();
     dtpShipDate.Value             = mySce.ExpShippingDate;
     dtpArrivalDate.Value          = mySce.ExpArrivalDate;
 }