protected void GetData() { string str = " where 1=1 "; if (Name.Text != "") { str += " and Name='" + Name.Text + "'"; } if (StudentNum.Text != "") { str += " and StudentNum='" + StudentNum.Text + "'"; } string confident = "select * from PartyData " + str; //string whstr = "select count(*) from Personal_Data " + str; AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("PartyData", str); Data_Show.DataSource = m.GetData_Paging("PartyData", confident, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void GetData() { string confident = "select * from Personal_Data where TypeName='" + MemberStatus.SelectedValue + "'"; Data_Show.DataSource = m.GetData(confident); Data_Show.DataBind(); }
protected void GetData() { string wherestr = " where StudentNum='" + Session["StudentNum"].ToString() + "'"; string result = m.Get_FieId_Data("MemberStatus_NO,Power_NO", "Personal_Data", wherestr); //获取该学号的党员身份和权限 string str = " where 1=1 and (Browse_Authority like '%all%' or Browse_Authority like '%" + result.Split(',')[0] + "%' or Browse_Authority like '%" + result.Split(',')[1] + "%') and Audit_State=1"; if (Files_Name.Text != "") { str += " and Datum_Name like '%" + Files_Name.Text + "%'"; } if (Upload_Time.Text != "") { str += " and Upload_Time > '" + Upload_Time.Text + "' and Upload_Time < '" + Convert.ToDateTime(Upload_Time.Text).AddDays(1).ToString() + "'"; } string confident = "select * from Datum " + str; //string whstr = "select count(*) from Datum " + str; AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Datum", str); Data_Show.DataSource = m.GetData_Paging("Datum", confident, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void GetData() { string str = " where 1=1 and studentnum<>'admin'"; if (Name.Text != "") { str += " and Name like '%" + Name.Text + "%'"; } if (CollegeName.Text != "") { str += " and CollegeName='" + CollegeName.Text + "'"; } if (TypeName.Text != "") { str += " and TypeName='" + TypeName.Text + "'"; } string confident = "select * from Personal_Data " + str; //查询条件 AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Personal_Data", str); Data_Show.DataSource = m.GetData_Paging("Personal_Data", confident, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["StudentNum"] != null) { if (m.Get_FieId_Data("Power_NO", "PartyData", " where StudentNum='" + Session["StudentNum"].ToString() + "'") != "003") { if (Request.QueryString["studentnum"] == null) { return; } string studentnum = Request.QueryString["studentnum"].ToString(); string str = " where studentnum='" + studentnum + "'"; string confident = "select * from Record_Details" + str + " order by Operate"; name.InnerText = m.Get_FieId_Data("Name", "PartyData", " where StudentNum='" + studentnum + "'") + "记录"; AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Record_Details", str); Data_Show.DataSource = m.GetData_Paging("Record_Details", confident, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); } } } }
protected void GetData() { string sqlstr = " where (1=1 or(Audit_Person like '" + Session["StudentNum"].ToString() + "' and Update_Type=4))"; if (Status.SelectedValue != "all") { sqlstr += " and Update_Status=" + Convert.ToInt32(Status.SelectedValue); } AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Update_Data", sqlstr); sqlstr = "select * from Update_Data " + sqlstr + " order by Update_Status"; Data_Show.DataSource = m.GetData_Paging("Update_Data", sqlstr, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void GetData() { string t = ""; if (Message_Status.SelectedValue != "全部") { t = " and Message_Status='" + Message_Status.SelectedValue.ToString() + "'"; } string sqlstr = " where ((StudentNum='" + Session["StudentNum"].ToString() + "' or StudentNum like '%all%' or Authority like '%all%' or Authority like '%" + Session["StudentNum"].ToString() + "%')" + t + " and TypeClass=1) or (TypeClass=2 and Message_Time>'" + DateTime.Now + "') or (TypeClass=3 and Authority='" + Session["StudentNum"].ToString() + "'" + t + ") or(TypeClass=4 and Authority='" + Session["StudentNum"].ToString() + "'" + t + ") or (TypeClass=5 and Authority='" + Session["StudentNum"].ToString() + "'" + t + ")"; AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Message", sqlstr); sqlstr = "select * from Message " + sqlstr + " order by Message_Status"; Data_Show.DataSource = m.GetData_Paging("Message", sqlstr, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void AspNetPager1_PageChanging(object sender, Wuqi.Webdiyer.PageChangingEventArgs e) { AspNetPager1.CurrentPageIndex = e.NewPageIndex; if (Request.QueryString["studentnum"] == null) { return; } string studentnum = Request.QueryString["studentnum"].ToString(); string str = " where studentnum='" + studentnum + "'"; string confident = "select * from Record_Details" + str + " order by Operate"; name.InnerText = m.Get_FieId_Data("Name", "PartyData", " where StudentNum='" + studentnum + "'") + "记录"; AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Record_Details", str); Data_Show.DataSource = m.GetData_Paging("Record_Details", confident, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void getData() { string whstr = " where 1=1"; if (Name.Text != "") { whstr += " and Name like '%" + Name.Text + "%'"; } if (StudentNum.Text != "") { whstr += " and StudentNum like '%" + StudentNum.Text + "%'"; } AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("PartyData", whstr); whstr = "select * from PartyData" + whstr; Data_Show.DataSource = m.GetData_Paging("PartyData", whstr, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }
protected void GetData() { string str = " where 1=1"; if (Metting_Theme.Text != "") { str += " and Metting_Theme like '%" + Metting_Theme.Text + "%'"; } if (Work_Message_Time.Text != "") { str += " and Work_Message_Time > '" + Work_Message_Time.Text + "' and Work_Message_Time < '" + Convert.ToDateTime(Work_Message_Time.Text).AddDays(1).ToString() + "'"; } string confident = "select * from Work_Info " + str; //string whstr = "select count(*) from Work_Info " + str; AspNetPager1.AlwaysShow = true; AspNetPager1.PageSize = 10; AspNetPager1.RecordCount = m.Data_Count("Work_Info", str); Data_Show.DataSource = m.GetData_Paging("Work_Info", confident, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize); Data_Show.DataBind(); }