コード例 #1
0
        private void pictNewThreshold_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                // iOpportunityId = 0;
                string strFormula = ddlSource.SelectedValue.ToString();

                if (ddlSource.SelectedValue.ToString().Trim() == "")
                {
                    Telerik.WinControls.RadMessageBox.Show(this, "Please select Opportunity Build.", "Opportunity", MessageBoxButtons.OK, RadMessageIcon.Error, MessageBoxDefaultButton.Button1);
                    return;
                }
                //if (strPtnlFilter == "")
                //{
                //    Telerik.WinControls.RadMessageBox.Show(this, "You have not selected Eligibility condition for the opportunity you wish to continue", "Opportunity", MessageBoxButtons.OK, RadMessageIcon.Error, MessageBoxDefaultButton.Button1);
                //}
                // pgThresholds.Controls.Clear();
                string[]      strT1 = Common.timePeriods.strtp1;
                string[]      strT2 = Common.timePeriods.strtp2;
                ctrlThreshold ctl   = new ctrlThreshold(iOpportunityId, strFormula, Common.strPtnlFilter, strT1, strT2);
                if (ctl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    bIsThresholdModified = true;
                    strCt    = ctl.strCutOff.Split(';');
                    strCount = ctl.strCount.Split(';');
                    strAvg   = ctl.strAvgDelta.Split(';');
                    // Common.strPtnlFilter="";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #2
0
 public void fnShowThreshold()
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         if (Common.sOpportunityName != "")
         {
             iOpportunityId = int.Parse(grdOppList.CurrentRow.Cells["OPPORTUNITY_ID"].Value.ToString());
             string strFormula    = grdOppList.CurrentRow.Cells["FORMULA"].Value.ToString();
             string strPtnlFilter = grdOppList.CurrentRow.Cells["ELGBL_FORMULA"].Value.ToString();
             // pgThresholds.Controls.Clear();
             ctrlThreshold ctl = new ctrlThreshold(iOpportunityId, strFormula, strPtnlFilter, Common.timePeriods.strtp1, Common.timePeriods.strtp2);
             if (ctl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
             }
             //ctl.Dock = DockStyle.Fill;
             //Telerik.WinControls.UI.RadGroupBox gbDummy = Common.GetfrmDummy();
             //pgThresholds.Controls.Add(gbDummy);
             //pgThresholds.Controls.Add(ctl);
             //pgThresholds.Controls.Remove(gbDummy);
         }
         else
         {
             Telerik.WinControls.RadMessageBox.Show(this, "Please select Opportunity.", "Information", MessageBoxButtons.OK, RadMessageIcon.Info, MessageBoxDefaultButton.Button1);
             pgVRecommendation.SelectedPage = pgOpportunityMapping;
             fnShowOpporunityList(true);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }