SearchCheckIn.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:1k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.WebControls.WebParts;
  11. using System.Web.UI.HtmlControls;
  12. public partial class Articles_SearchCheckIn : System.Web.UI.Page
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         LoginLogic.MatchLoad("../", "Articles_SearchCheckIn");
  17.         if (!IsPostBack)
  18.         {
  19.             DropLoadSet();
  20.         }
  21.     }
  22.     public void DropLoadSet()
  23.     {
  24.         //登记表示
  25.         List<EnumList> list = EnumGet.DengJiGetEnum();
  26.         for (int i = 0; i < list.Count; i++)
  27.         {
  28.             KeyValue_DJBS.Items.Add(list[i].Text);
  29.         }
  30.         KeyValue_DJBS.SelectedIndex = KeyValue_DJBS.Items.Count - 1;
  31.     }
  32.     protected void Button1_Click(object sender, EventArgs e)
  33.     {
  34.         string SqlStr = "";
  35.         SqlStr += "DJBS like '" + RP.SDot(KeyValue_DJBS.Text) + "%' and";
  36.         SqlStr += " WP ='" + RP.SDot(KeyValue_WP.Text) + "'";
  37.         int ISL1 = 0;
  38.         int ISL2 = 0;
  39.         if (int.TryParse(KeyValue_SL1.Text, out ISL1) && int.TryParse(KeyValue_SL2.Text, out ISL2))
  40.         {
  41.             SqlStr += " and (SL between " + ISL1.ToString() + " and " + ISL2.ToString() + ")";
  42.         }
  43.         SqlStr = Server.UrlEncode(SqlStr);
  44.         Response.Redirect("CheckInManager.aspx?TiaoJian=" + SqlStr);
  45.     }
  46. }