BatchExport.aspx.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. using System.Data;
  8. using System.Data.OleDb;
  9. using System.Collections;
  10. public partial class Admin_BatchExport : System.Web.UI.Page
  11. {
  12. int i;
  13. LYS.UserData1 myud = new LYS.UserData1();
  14. protected void Page_Load(object sender, EventArgs e)
  15. {
  16. }
  17. protected void Button1_Click(object sender, EventArgs e)
  18. {
  19. //myud.BindTableNameToListBox(TableList);
  20. ListItem li=new ListItem();
  21. li.Text="督导评价信息表";
  22. li.Value="TkJL";
  23. TableList.Items.Add(li);
  24. }
  25. protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
  26. {
  27. TableList.Visible = true;
  28. string selTableName = TableList.SelectedValue.ToString();
  29. myud.BindFieldNameToCheckBoxList(selTableName, FieldNameList);
  30. }
  31. protected void Button7_Click(object sender, EventArgs e)
  32. {
  33. string strFiledName = "";
  34. for (i = 0; i <= FieldNameList.Items.Count - 1; i++)
  35. {
  36. if (FieldNameList.Items[i].Selected)
  37. { strFiledName = strFiledName + "," + FieldNameList.Items[i].Text; }
  38. }
  39. // Response.Write(strFiledName + "<br>");
  40. strFiledName = strFiledName.Substring(1, strFiledName.Length - 1);
  41. // Response.Write("A="+strFiledName+"<br>");
  42. Session.Add("Fieldlist", strFiledName);
  43. // Response.Write(Session["Fieldlist"].ToString());
  44. Response.Redirect("~//Admin//BatchExport2.aspx");
  45. }
  46. }