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 (Commodity_BLL.GetRecordCount(" CommoditySonID ='" + id + "' ") != 0 && CommoditySon_BLL.GetRecordCount(" CommoditySonID ='" + id + "' ") != 0)
                {
                    RadAjaxManager1.Alert("删除失败!");
                }
                else
                {
                    CommoditySon_BLL.Delete(e.CommandArgument.ToString());
                    RadGrid1.Rebind();
                }
            }
        }