SearchArticlesInfo.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- public partial class Articles_SearchArticlesInfo : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Articles_SearchArticlesInfo");
- if (!IsPostBack)
- {
- DropLoadSet();
- }
- }
- public void DropLoadSet()
- {
- //用品类别
- KeyValue_YPLB.DataTextField = "LBMC";
- KeyValue_YPLB.DataValueField = "ID";
- KeyValue_YPLB.DataSource = EnumGet.UseThingsTypeGetEnum();
- KeyValue_YPLB.DataBind();
- ListItem linone = new ListItem();
- linone.Text = "无";
- linone.Value = "0";
- KeyValue_YPLB.Items.Add(linone);
- KeyValue_YPLB.SelectedIndex = KeyValue_YPLB.Items.Count - 1;
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- string SqlStr = "";
- SqlStr += " YPMC like '" + RP.SDot(KeyValue_YPMC.Text) + "%' and";
- SqlStr += " YPLB ='" + RP.SDot(KeyValue_YPLB.SelectedValue) + "' and";
- SqlStr += " YPMS like '" + RP.SDot(KeyValue_YPMS.Text) + "%' ";
- int IJJK = 0;
- if(int.TryParse(KeyValue_JJKC.Text,out IJJK))
- {
- SqlStr += " and JJKC <=" + IJJK.ToString();
- }
- SqlStr = Server.UrlEncode(SqlStr);
- Response.Redirect("ArticlesInfoManager.aspx?TiaoJian=" + SqlStr);
- }
- }