Пример #1
0
        //find button
        private void Button1_Click(object sender, EventArgs e)
        {
            Plans foundplan = new Plans();

            if (radioButton1.Checked == true)
            {
                foundplan = Plans.FindPlanById(Convert.ToInt32(textBox1.Text));
            }
            else if (radioButton2.Checked == true)
            {
                foundplan = Plans.FindPlanByName(textBox1.Text);
            }

            if (foundplan != null)
            {
                groupBox2.Visible = true;

                Pid   = foundplan.planId;
                Pname = foundplan.planName;

                label7.Text  = foundplan.planId.ToString();
                label8.Text  = foundplan.planName;
                label11.Text = foundplan.planCategory;
                label12.Text = foundplan.minimumTermSpan.ToString();
                label13.Text = foundplan.minimumAmount.ToString();
                label14.Text = foundplan.planDescription;
            }
        }
Пример #2
0
        //Find button Clicked
        private void Button1_Click(object sender, EventArgs e)
        {
            Plans foundplan = new Plans();

            if (radioButton1.Checked == true)
            {
                foundplan = Plans.FindPlanById(Convert.ToInt32(textBox1.Text));
            }
            else if (radioButton2.Checked == true)
            {
                foundplan = Plans.FindPlanByName(textBox1.Text);
            }
            //if(foundplan != null)
            //    MessageBox.Show(" Found Plan = "+foundplan.planName);
            if (foundplan != null)
            {
                groupBox2.Visible    = true;
                label7.Text          = foundplan.planId.ToString();
                label8.Text          = foundplan.planName;
                comboBox1.Text       = foundplan.planCategory;
                numericUpDown1.Value = foundplan.minimumTermSpan;
                textBox2.Text        = foundplan.minimumAmount.ToString();
                richTextBox1.Text    = foundplan.planDescription;
            }
        }
        //next button clicked
        private void Button2_Click(object sender, EventArgs e)
        {
            groupBox2.Visible = true;

            calc = Plans.FindPlanByName(comboBox1.Text);

            label7.Text  = calc.planId.ToString();
            label8.Text  = calc.planName;
            label12.Text = calc.minimumTermSpan.ToString();
            label13.Text = calc.minimumAmount.ToString();

            numericUpDown2.Value   = calc.minimumTermSpan;
            numericUpDown2.Minimum = calc.minimumTermSpan;

            textBox2.Text = calc.minimumAmount.ToString();
        }
Пример #4
0
        //Find button clicked
        private void Button1_Click(object sender, EventArgs e)
        {
            Plans foundplan = new Plans();

            if (radioButton1.Checked == true)
            {
                foundplan = Plans.FindPlanById(Convert.ToInt32(textBox1.Text));
            }
            else if (radioButton2.Checked == true)
            {
                foundplan = Plans.FindPlanByName(textBox1.Text);
            }
            //if(foundplan != null)
            //    MessageBox.Show(" Found Plan = "+foundplan.planName);
            if (foundplan != null)
            {
                dataGridView1.DataSource = new List <Plans>()
                {
                    foundplan
                }
            }
            ;
        }