示例#1
0
        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            string id = e.CommandArgument.ToString();

            if (e.CommandName == "Delete")//删除数据
            {
                Users_Bll.DeleteList(id);
                if (Appraise_Bll.GetRecordCount("UserID='" + id + "'") != 0)
                {
                    Appraise_Bll.DeleteList2(id);
                }
                if (ShoppingCart_Bll.GetRecordCount("UserID='" + id + "'") != 0)
                {
                    ShoppingCart_Bll.DeleteList2(id);
                }
                if (OrderDetail_Bll.GetRecordCount("UserID='" + id + "'") != 0)
                {
                    OrderDetail_Bll.DeleteList2(id);
                }
                if (Orders_Bll.GetRecordCount("UserID='" + id + "'") != 0)
                {
                    Orders_Bll.DeleteList2(id);
                }
                RadGrid1.Rebind();
            }
        }
示例#2
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            string idlist = GetSelIDlist();

            if (idlist.Trim().Length == 0)
            {
                return;
            }
            bll.DeleteList(idlist);
            BindData();
        }