public void flashListview_check() { //--------------------------------------------- listView1.Items.Clear(); pageshow = new SqlHelper(); totalpage = pageshow.totalpage("select * from CheckPlacement_Data", pagesize, "CheckPlacement_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); DataTable dt = pageshow.ListviewShow("select * from CheckPlacement_Data order by Class_week", currentpage, pagesize, "CheckPlacement_Data"); UIShow show = new UIShow(); show.placement_listview_write(dt, listView1, currentpage, pagesize); }
//外部调用,暂时不明作用 public void NewMethod() { clear_listview(); DataTable dt = pageshow.ListviewShow("select * from Classes_Data", currentpage, pagesize, "Classes_Data"); UIShow show = new UIShow(); show.listview_write_classes_data(dt, listView1); pageshow = new SqlHelper(); totalpage = pageshow.totalpage("select * from Classes_Data", pagesize, "Classes_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); }
private void frmTeacher_Load(object sender, EventArgs e) { listView1.Items.Clear(); setTbEnable(); NoIdTeacher();//添加对应的教师 pageshow = new SqlHelper(); totalpage = pageshow.totalpage("select * from Teachers_Data", pagesize, "Teachers_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); DataTable dt = pageshow.ListviewShow("select * from Teachers_Data", currentpage, pagesize, "Teachers_Data"); UIShow show = new UIShow(); show.teachers_listview_write(dt, listView1); groupBox1.SendToBack(); }
private void buttonX3_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtSearch.Text)) { frmTeacher_Load(sender, e); } else { listView1.Items.Clear(); string fe = "Teacher like '%" + txtSearch.Text.Trim() + "%'"; string cmdText = "SELECT * FROM Teachers_Data WHERE " + fe; pageshow = new SqlHelper(); totalpage = pageshow.totalpage(cmdText, pagesize, "Teachers_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); DataTable dt = pageshow.ListviewShow(cmdText, currentpage, pagesize, "Teachers_Data"); UIShow show = new UIShow(); show.teachers_listview_write(dt, listView1); } }
private void btnSearch_Click(object sender, EventArgs e) { if (expertflag==0) { if (string.IsNullOrWhiteSpace(txtSearch.Text)) { }// flashListview(); else { listView1.Items.Clear(); string fe = "Teacher like '%" + txtSearch.Text.Trim() + "%' or Supervisor_Name like '%" + txtSearch.Text.Trim() + "%'"; string cmdText = "SELECT * FROM Placement_Data WHERE " + fe; pageshow = new SqlHelper(); totalpage = pageshow.totalpage(cmdText, pagesize, "Placement_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); DataTable dt = pageshow.ListviewShow(cmdText, currentpage, pagesize, "Placement_Data"); UIShow show = new UIShow(); show.placement_listview_write(dt, listView1, currentpage, pagesize); } } else { if (string.IsNullOrWhiteSpace(txtSearch.Text)) { }// flashListview(); else { listView1.Items.Clear(); string fe = "Teacher like '%" + txtSearch.Text.Trim() + "%' or Supervisor_Name like '%" + txtSearch.Text.Trim() + "%'"; string cmdText = "SELECT * FROM CheckPlacement_Data WHERE " + fe; pageshow = new SqlHelper(); totalpage = pageshow.totalpage(cmdText, pagesize, "CheckPlacement_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); DataTable dt = pageshow.ListviewShow(cmdText, currentpage, pagesize, "CheckPlacement_Data"); UIShow show = new UIShow(); show.placement_listview_write(dt, listView1, currentpage, pagesize); } } }
private void frmPlan_Load(object sender, EventArgs e) { try { listView1.Items.Clear(); pageshow = new SqlHelper(); totalpage = pageshow.totalpage("select * from Classes_Data", pagesize, "Classes_Data"); labPageAll.Text = totalpage + ""; textBoxNow.Text = currentpage.ToString(); DataTable dt = pageshow.ListviewShow("select * from Classes_Data",currentpage,pagesize,"Classes_Data"); UIShow show = new UIShow(); show.listview_write_classes_data(dt,listView1); } catch (Exception ex) { MessageBox.Show(ex.Message); } }