protected void btnnopass_Click(object sender, EventArgs e) { for (int i = 0; i <= gdvexamshop.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)gdvexamshop.Rows[i].FindControl("cbxselshop"); Label lblshopid = (Label)gdvexamshop.Rows[i].FindControl("lblsign"); if (cbox.Checked == true) { ShopInfoTableAdapter upshopif = new ShopInfoTableAdapter(); long shopid = new long(); shopid = Convert.ToInt64(lblshopid.Text); QueriesTableAdapter qta = new QueriesTableAdapter(); int count = qta.proc_updaterolesandshop("4", shopid); if (count == -1) { Response.Write("<script language=javascript>alert('温馨提示:\\n\\n用户店铺审核已经设置未通过!');</script>"); Response.Write("<script language=javascript>window.location.href='shopexamine.aspx'</script>"); //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n" + GridView1.Rows[i].Cells[2].Text.Trim() + "您已经选择!');", true); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n用户店铺由于一些原因设置失败!');", true); } } } }
protected void btnnopass_Click(object sender, EventArgs e) { for (int i = 0; i <= gdvexamshop.Rows.Count - 1; i++) { CheckBox cbox = (CheckBox)gdvexamshop.Rows[i].FindControl("cbxselshop"); Label lblshopid = (Label)gdvexamshop.Rows[i].FindControl("lblsign"); if (cbox.Checked == true) { ShopInfoTableAdapter upshopif = new ShopInfoTableAdapter(); long shopid = new long(); shopid = Convert.ToInt64(lblshopid.Text); QueriesTableAdapter qta = new QueriesTableAdapter(); int count = qta.proc_updaterolesandshop("4", shopid); if (count==-1) { Response.Write("<script language=javascript>alert('温馨提示:\\n\\n用户店铺审核已经设置未通过!');</script>"); Response.Write("<script language=javascript>window.location.href='shopexamine.aspx'</script>"); //ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n" + GridView1.Rows[i].Cells[2].Text.Trim() + "您已经选择!');", true); } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "alert('温馨提示:\\n\\n用户店铺由于一些原因设置失败!');", true); } } } }