Example #1
0
        private void removeIngredientToolStripMenuItem_Click(object sender, EventArgs e)
        {
            RecBO = new RecipeBO();
            RecBL = new RecipeBL();
            int counter = ingmeass.Count();
            int index   = 0;

            if (MessageBox.Show("Are you sure?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                int indicator = 0;
                RecBO.recipeid = Convert.ToString(RecipeID);
                RecBO.ingdesc  = ingdesc;
                RecBL.removeRecipeIng(RecBO);
                countremovedIng = countremovedIng + 1;
                foreach (DataRow row in RecBL.searchIngByID(RecBO).Rows)
                {
                    tempRemoveIng.Add(row.ItemArray[0].ToString());
                }
                RecBO.recipeid           = Convert.ToString(RecipeID);
                dataGridView1.DataSource = RecBL.getIngByRecID(RecBO);
                time = 0;
                notifier("Ingredient successfully remove to the dish!");
                lblNotif.Left         = (this.ClientSize.Width - lblNotif.Size.Width) / 2;
                this.panel3.BackColor = System.Drawing.Color.DodgerBlue;
            }
        }