public ActionResult DeleteProduct(int Id) { ProductManage pm = new ProductManage(); pm.Delete(Id); return(RedirectToAction("Index", "Admin")); }
void InitInfo() { productId = CECRequest.GetQueryInt("productId", 0); action = CECRequest.GetQueryString("action"); categoryId = CECRequest.GetQueryInt("categoryid", 0); if (action.ToLower() == "del") { ProductManage.Delete(productId); Response.Redirect("productlist.aspx"); return; } this.ddlcategoryList.BuildTree(ProductCategoryManage.GetCategoryForTable(), "CategoryName", "CategoryId"); this.ddlcategoryList.SelectedValue = categoryId.ToString(); }