protected void ImgSrs_Click3(object sender, EventArgs e) { getUser1(uID); getUser2(uID); GridBind(getUser3(uID)); Pagination1.Refresh(); }
/// <summary> /// 发送给全部用户 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSendAll_Click(object sender, EventArgs e) { string sql = string.Format(@"select * from dbo.ML_Member a left join ( select * from ML_NewsClassMain where sid0={0} ) b on a.nID=b.sid1 where b.sid1 is null", _ID); DataTable dt = her.ExecuteDataTable(sql); if (dt.Rows.Count > 0) { U_ShowDivPic(this.Page, "正在导入中…"); foreach (DataRow dr in dt.Rows) { XueYuan_Add(dr["nID"].ToString()); } GridBind(); Pagination1.Refresh(); this.Page.Response.Write("<script language=javascript>;HideWait();</script>"); } else { AjaxAlert.AlertMsgAndNoFlush(this, "无未发送学员"); //ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('无未发送学员')</script>"); } }
protected void imgdelete_Click(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { CheckBox ckb = (CheckBox)gridField.Rows[i].FindControl("CheckSel"); if (ckb.Checked) { //bool success = Menber.MemberDelete(gridField.DataKeys[i].Value.ToString()); //if (!success) //{ // ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('发生未知错误!请重试')</script>"); //} } } GridBind(); Pagination1.Refresh(); }
/// <summary> /// 选中发送 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void imgdelete_Click(object sender, EventArgs e) { for (int i = 0; i < gridField.Rows.Count; i++) { CheckBox ckb = (CheckBox)gridField.Rows[i].FindControl("CheckSel"); if (ckb.Checked) { bool success = XueYuan_Add(gridField.DataKeys[i].Value.ToString()); //if (!success) //{ // ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('发生未知错误!请重试')</script>"); //} //else //{ // ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('添加成功')</script>"); //} } } GridBind(); Pagination1.Refresh(); AjaxAlert.AlertMsgAndNoFlush(this, "发送成功"); //ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('发送成功')</script>"); }
protected void ImgSrs_Click(object sender, EventArgs e) { GridBind(); Pagination1.Refresh(); }