Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindRptAplhas();

                if (Request.QueryString["i"] != null)
                {
                    try
                    {
                        int ingrId = int.Parse(Request.QueryString["i"].ToString());
                        IngredientEdit1.PrimaryKeyIndex = ingrId;
                        IngredientEdit1.Bind();

                        btnAddNewIngredient.Visible = false;
                        divEdit.Visible             = true;
                        pnlGrids.Visible            = false;
                        AplhabetsRow.Visible        = false;
                    }
                    catch (Exception)
                    {
                        throw;
                    }
                }
                //else
                //BindGrids();
            }
        }
Ejemplo n.º 2
0
        void gvwIngred_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridView gvw = (GridView)sender;

            int prefId = int.Parse(gvw.SelectedDataKey.Value.ToString());

            IngredientEdit1.PrimaryKeyIndex = prefId;
            IngredientEdit1.Bind();

            btnAddNewIngredient.Visible = false;
            rptAlphas.Visible           = false;
            pnlGrids.Visible            = false;
            divEdit.Visible             = true;
            AplhabetsRow.Visible        = false;
        }