Example #1
0
        protected void btnNew_Click(object sender, EventArgs e)
        {
            pnlEdit.Visible = true;

            ingredient      = new SvcKitchen.Ingredient();
            isNewIngredient = true;

            lblID.Text             = "";
            txtIngredientName.Text = "";
        }
Example #2
0
        protected void gvIngredients_SelectedIndexChanged(object sender, EventArgs e)
        {
            ingredient      = new SvcKitchen.Ingredient();
            ingredient.ID   = int.Parse(gvIngredients.SelectedRow.Cells[2].Text);
            ingredient.Name = gvIngredients.SelectedRow.Cells[3].Text;

            pnlEdit.Visible = true;

            isNewIngredient = false;

            lblID.Text             = ingredient.ID.ToString();
            txtIngredientName.Text = ingredient.Name;
        }