protected void lkbtnDownloadCheck_Click(object sender, EventArgs e)
        {
            int num = 0;

            foreach (GridViewRow row in grdAuthorizeProducts.Rows)
            {
                CheckBox box = (CheckBox)row.FindControl("checkboxCol");
                if ((box != null) && box.Checked)
                {
                    num++;
                }
            }
            if (num == 0)
            {
                ShowMsg("请先选择要下载的商品", false);
            }
            else
            {
                foreach (GridViewRow row2 in grdAuthorizeProducts.Rows)
                {
                    CheckBox box2 = (CheckBox)row2.FindControl("checkboxCol");
                    if (box2.Checked)
                    {
                        int productId = (int)grdAuthorizeProducts.DataKeys[row2.RowIndex].Value;
                        SubSiteProducthelper.DownloadProduct(productId);
                    }
                }
                ReBindData(false);
            }
        }
Exemplo n.º 2
0
        private void grdAuthorizeProducts_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e)
        {
            System.Web.UI.WebControls.GridViewRow gridViewRow = (System.Web.UI.WebControls.GridViewRow)((System.Web.UI.Control)e.CommandSource).NamingContainer;
            int productId = (int)this.grdAuthorizeProducts.DataKeys[gridViewRow.RowIndex].Value;

            if (e.CommandName == "download")
            {
                SubSiteProducthelper.DownloadProduct(productId, this.isDownCategory.Checked);
                this.ReBindData(false);
            }
        }
        protected void grdAuthorizeProducts_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            GridViewRow namingContainer = (GridViewRow)((Control)e.CommandSource).NamingContainer;

            int productId = (int)grdAuthorizeProducts.DataKeys[namingContainer.RowIndex].Value;

            if (e.CommandName == "download")
            {
                SubSiteProducthelper.DownloadProduct(productId);

                ReBindData(false);
            }
        }
Exemplo n.º 4
0
        private void lkbtnDownloadCheck_Click(object sender, System.EventArgs e)
        {
            int num = 0;

            foreach (System.Web.UI.WebControls.GridViewRow gridViewRow in this.grdAuthorizeProducts.Rows)
            {
                System.Web.UI.WebControls.CheckBox checkBox = (System.Web.UI.WebControls.CheckBox)gridViewRow.FindControl("checkboxCol");
                if (checkBox.Checked)
                {
                    num++;
                    int productId = (int)this.grdAuthorizeProducts.DataKeys[gridViewRow.RowIndex].Value;
                    SubSiteProducthelper.DownloadProduct(productId, this.isDownCategory.Checked);
                }
            }
            if (num == 0)
            {
                this.ShowMsg("请先选择要下载的商品", false);
                return;
            }
            this.ReBindData(false);
        }
Exemplo n.º 5
0
        private void lkbtnDownloadCheck_Click(object sender, EventArgs e)
        {
            int num = 0;

            foreach (GridViewRow row in this.grdAuthorizeProducts.Rows)
            {
                CheckBox box = (CheckBox)row.FindControl("checkboxCol");
                if (box.Checked)
                {
                    num++;
                    int productId = (int)this.grdAuthorizeProducts.DataKeys[row.RowIndex].Value;
                    SubSiteProducthelper.DownloadProduct(productId, this.isDownCategory.Checked);
                }
            }
            if (num == 0)
            {
                this.ShowMsg("请先选择要下载的商品", false);
            }
            else
            {
                this.ReBindData(false);
            }
        }