/// <summary> /// 根据来源名搜索,好像没用 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> //protected void Search_Click(object sender, EventArgs e) //{ // string strkey = sourcekey.Text.ToString(); // B_Source bsource = new B_Source(); // GridView1.DataSource =bsource.SearchSource(strkey); // GridView1.DataBind(); //} protected void btndelete_Click(object sender, EventArgs e) { string[] chkArr = GetChecked(); if (chkArr != null) { for (int i = 0; i < chkArr.Length; i++) { int itemID = Convert.ToInt32(chkArr[i]); bsource.DeleteByID(itemID.ToString()); } DataBind(); } }
private void DeleteSource(string SId) { B_Source bsource = new B_Source(); if (bsource.DeleteByID(SId)) { HttpContext.Current.Response.Write("<script language=javascript> alert('删除成功!');window.document.location.href='SourceManage.aspx';</script>"); } }