Ejemplo n.º 1
0
        /// <summary>
        /// 批量激活
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void BtnActive_Click(object sender, EventArgs e)
        {
            string Ids = "";

            for (int i = 0; i <= GridView1.Rows.Count - 1; i++)
            {
                CheckBox cbox = (CheckBox)GridView1.Rows[i].FindControl("chkSel");
                if (cbox.Checked == true)
                {
                    if (string.IsNullOrEmpty(Ids))
                    {
                        Ids = GridView1.DataKeys[i].Value.ToString();
                    }
                    else
                    {
                        Ids += "," + GridView1.DataKeys[i].Value.ToString();
                    }
                }
            }
            if (!string.IsNullOrEmpty(Ids))
            {
                B_ADZone.BatchActive(Ids);
            }
            this.RepNodeBind();
        }
Ejemplo n.º 2
0
        // 批量激活
        protected void BtnActive_Click(object sender, EventArgs e)
        {
            string Ids = Request.Form["idchk"];

            if (!string.IsNullOrEmpty(Ids))
            {
                B_ADZone.BatchActive(Ids);
            }
            DataBind();
        }