private void button1_Click(object sender, EventArgs e)
 {
     if (btnErtek.Checked)
     {
         tmpKe = new KedvezmenyErtek(Convert.ToDouble(numericKeyboar1.resString));
     }
     else if (btnSzazalek.Checked)
     {
         tmpKe = new KedvezmenyErtek(selKedvSzaz);
     }
     else if (btnPartner.Checked)
     {
         if (selPartner != null)
         {
             tmpKe = new KedvezmenyErtek(selPartner);
         }
     }
     DialogResult = DialogResult.OK;
     Close();
 }
Esempio n. 2
0
        private void frmShadowLayer_Load(object sender, EventArgs e)
        {
            switch (mode)
            {
                case UsingForms.PartnerInsert:
                    {
                        if (param == 0) { Close(); }
                        frmPartnerInsert p = new frmPartnerInsert(param, s_PARAM);

                        p.ShowDialog();
                        Close();
                        break;
                    }
                case UsingForms.KedvezmenyValaszt:
                    {
                        frmKedevemenyChoice kc = new frmKedevemenyChoice();
                        kc.ShowDialog();
                        if (kc.DialogResult == DialogResult.OK)
                        {
                            ke = kc.tmpKe;
                        }
                        Close();
                        break;
                    }
                case UsingForms.MediaPlayer:
                    {
                        frmMediaPlayer mp = new frmMediaPlayer();
                        mp.ShowDialog();

                        Close();
                        break;
                    }
                default:
                    {
                        Close();
                        break;
                    }
            }
        }