protected void btnUpdate_Click(object sender, EventArgs e)
        {
            ProductCategory pcObj = new ProductCategory(Convert.ToInt32(rtvCatList.SelectedNode.Value), txt_cat_name.Value, txt_cat_name_en.Value, txt_cat_desc.Value, txt_cat_desc_en.Value, Convert.ToInt32(cb_P_catID.SelectedValue), isActive.Checked, 1, txtSelectedFile.Value, Convert.ToInt32(txtOrder.Value));

            proCateController.UpdateCategory(pcObj);
            BindingData(Convert.ToInt32(rtvCatList.SelectedNode.Value));
            Response.Redirect(Request.RawUrl);
        }
Ejemplo n.º 2
0
        protected void grvCategories_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow     editRow            = grvColor.Rows[grvColor.EditIndex];
            ProductCategory newProductCategory = new ProductCategory(
                Convert.ToInt32((editRow.FindControl("hiddenColorID") as HiddenField).Value),
                (editRow.FindControl("txt_Product_Category_Name") as HtmlInputText).Value,
                (editRow.FindControl("txt_Product_Category_Name") as HtmlInputText).Value,
                (editRow.FindControl("txt_Product_Category_Desc") as TextBox).Text,
                (editRow.FindControl("txt_Product_Category_Desc") as TextBox).Text, 0,
                (editRow.FindControl("chkIsHidden") as CheckBox).Checked, 1,
                (editRow.FindControl("txt_Product_Category_Image") as HtmlInputText).Value, 0
                );

            ch.UpdateCategory(newProductCategory);

            grvColor.EditIndex = -1;
            BindData();
        }