SearchHotels.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 Hotels_SearchHotels : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Hotels_SearchHotels");
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- string SqlStr = "";
- if (!String.IsNullOrEmpty(KeyValue_ZSLBM.Text))
- {
- SqlStr += " ZSLBM like '" + KeyValue_ZSLBM.Text + "%'";
- }
- if (!String.IsNullOrEmpty(KeyValue_BGLDM.Text))
- {
- SqlStr += " and BGLDM like '" + RP.SDot(KeyValue_BGLDM.Text) + "%'";
- }
- int IKeyValue_ZSTS = 0;
- if (int.TryParse(KeyValue_ZSTS.Text, out IKeyValue_ZSTS))
- {
- SqlStr += " and ZSTS = " + IKeyValue_ZSTS.ToString() + "";
- }
- if (!String.IsNullOrEmpty(KeyValue_ZSDWDH.Text))
- {
- SqlStr += " and ZSDWDH like '" + KeyValue_ZSDWDH.Text + "%'";
- }
- decimal DKeyValue_ZJG = 0;
- if (decimal.TryParse(KeyValue_ZJG.Text, out DKeyValue_ZJG))
- {
- SqlStr += " and ZJG = " + DKeyValue_ZJG.ToString();
- }
- SqlStr = Server.UrlEncode(SqlStr);
- Response.Redirect("HotelsManager.aspx?TiaoJian=" + SqlStr);
- }
- }