Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 3
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
                }
            }
            ;
        }