Beispiel #1
0
 private void toolStripMenuItem3_Click(object sender, EventArgs e)
 {
     recBO = new RecipeBO();
     recBL = new RecipeBL();
     try
     {
         if (RecipeID != "" && RecipeID != null)
         {
             recBO.recipeid = RecipeID;
             recBO.recipe   = "";
             recBO.cat      = cat;
             if (status == "AVAILABLE")
             {
                 recBL.makeRecipeUnavail(recBO);
                 radioButton1.Checked = !radioButton1.Checked;
             }
             else
             {
                 recBL.makeRecipeAvail(recBO);
                 radioButton1.Checked = !radioButton1.Checked;
             }
             time     = 0;
             RecipeID = "";
             notifier("Dish successfully status changed.");
             lblNotif.Left         = (this.ClientSize.Width - lblNotif.Size.Width) / 2;
             this.panel3.BackColor = System.Drawing.Color.DodgerBlue;
             RecipeBO.recipe       = "";
             RecipeBO.cat          = cat;
         }
         else
         {
             time = 0;
             notifier("Please select a dish.");
             lblNotif.Left         = (this.ClientSize.Width - lblNotif.Size.Width) / 2;
             this.panel3.BackColor = System.Drawing.Color.Tomato;
         }
     }
     catch (Exception)
     {
         throw;
     }
 }