Ejemplo n.º 1
0
        protected void delete_Click(object sender, EventArgs e)
        {
            List <string> PjId = new List <string>();
            //string sqlText = "";
            string strID       = "";
            int    rowEffected = 0;

            foreach (RepeaterItem labID in Reproject1.Items)
            {
                CheckBox chk = (CheckBox)labID.FindControl("CheckBox1");
                if (chk.Checked)
                {
                    //查找该CheckBox所对应纪录的id号,在labID中
                    strID = ((Label)labID.FindControl("pj_ID")).Text;
                    PjId.Add(strID);
                }
            }
            lbl_Info.Text += strID;
            foreach (string id in PjId)
            {
                DBCallCommon.DeletePJByPj_ID(id);
                rowEffected++;
            }
            //防止刷新
            Response.Redirect("pjinfo.aspx?q=1");
        }