Ejemplo n.º 1
0
        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            string id = e.CommandArgument.ToString();

            if (e.CommandName == "Delete")
            {
                if (CommodityFather_BLL.GetRecordCount(" CommodityFatherID ='" + id + "' ") != 0 && CommoditySon_BLL.GetRecordCount(" CommodityFatherID ='" + id + "' ") != 0)
                {
                    RadAjaxManager1.Alert("删除失败!");
                }
                else
                {
                    CommodityFather_BLL.Delete(e.CommandArgument.ToString());
                    RadGrid1.Rebind();//删除
                }
            }
        }