Esempio n. 1
0
        //后加的删除
        protected void del_qichu(object sender, EventArgs e)
        {
            QiChuModel qichu  = new QiChuModel();
            Boolean    result = true;

            try
            {
                List <yh_jinxiaocun_qichushu> list = Session["qi_chu_select"] as List <yh_jinxiaocun_qichushu>;
                for (int i = 0; i < list.Count; i++)
                {
                    string name = Request["Checkbox_bd" + i];
                    if (name != null)
                    {
                        if (Convert.ToInt32(name) == i)
                        {
                            result = qichu.del_qichu_ff(list[i]._id) > 0;
                        }
                    }
                }
                if (result)
                {
                    shuaxin();
                    Response.Write("<script>alert('删除成功');</script>");
                }
            }
            catch
            {
                Response.Write(" <script>alert('网络错误,请稍后再试!');</script>");
            }
        }