日期:2014-05-18 浏览次数:21008 次
if (Session["Power"].ToString() == "管理员") { Response.Write("<script> alert('您没有去重权限')</script>"); } else { int rows = 0; BLL.CustomInfor bll = new BLL.CustomInfor(); DataSet ds1 = bll.SelectForDelete("业主"); for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { DataSet ds2 = bll.SelectByID("业主", Convert.ToInt32(ds1.Tables[0].Rows[i]["C_id"].ToString())); for (int j = 0; j < ds2.Tables[0].Rows.Count; j++) { if (ds1.Tables[0].Rows[i]["C_Phone"].ToString() == ds2.Tables[0].Rows[j]["C_Phone"].ToString()) { rows = rows + bll.DeleteCus(Convert.ToInt32(ds2.Tables[0].Rows[j]["C_id"].ToString())); } } } Response.Write("<script> alert('共删除了" + rows + "条数据')</script>"); } Bind();