日期:2014-05-17 浏览次数:20824 次
protected void btDownLoad_Click(object sender, EventArgs e)
{
string _ID = "";
foreach (GridViewRow gv in GridView1.Rows)
{
CheckBox cb = (CheckBox)gv.FindControl("CheckBox1");
if (cb.Checked)
{
int index = gv.RowIndex;
DataKey key = this.GridView1.DataKeys[index];//获取主键
Int64 GVID = Convert.ToInt64(key.Values["ID"]);
_ID += GVID.ToString() + ",";
}
}
if (_ID == "")
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "alert('请选择要下载的报告!')", true);
}
else
{
int count = _ID.Split(',').Length - 1;
string[] AID = new string[count];
AID = _ID.Split(',');
for (int i = 0; i < count; i++)
{