Exemplo n.º 1
0
 private void btnPlansNew_Click(object sender, EventArgs e)
 {
     EditPlan ep = new EditPlan(listBoxPlans);
     ep.ShowDialog();
     SwitchToPanel(panelPlans);
 }
Exemplo n.º 2
0
 private void btnPlansEdit_Click(object sender, EventArgs e)
 {
     if (form_loaded)
     {
         if (panelPlans.Visible)
         {
             if (listBoxPlans.SelectedIndex != -1)
             {
                 // get selected plan
                 int planId = Convert.ToInt32(listBoxPlans.SelectedValue.ToString());
                 EditPlan ep = new EditPlan(plan, listBoxPlans);
                 ep.ShowDialog();
             }
         }
         else
         {
             MessageBox.Show("Please select a plan first");
             SwitchToPanel(panelPlans);
         }
     }
 }