SearchMeals.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:1k
- 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 Meals_SearchMeals : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Meals_SearchMeals");
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- string SqlStr = "";
- if (!String.IsNullOrEmpty(KeyValue_YCLBMC.Text))
- {
- SqlStr += " YCLBMC like '" + KeyValue_YCLBMC.Text + "%'";
- }
- if (!String.IsNullOrEmpty(KeyValue_YCLBMC.Text))
- {
- SqlStr += " and CM like '" + RP.SDot(KeyValue_CM.Text) + "%'";
- }
- if (!String.IsNullOrEmpty(KeyValue_YCLBMC.Text))
- {
- SqlStr += " and YCDW like '" + RP.SDot(KeyValue_YCDW.Text) + "%'";
- }
- if (!String.IsNullOrEmpty(KeyValue_YCLBMC.Text))
- {
- SqlStr += " and YCDWDH like '" + KeyValue_YCDWDH.Text + "%'";
- }
- decimal DKeyValue_JG = 0;
- if (decimal.TryParse(KeyValue_JG.Text, out DKeyValue_JG))
- {
- SqlStr += " and JG =" + DKeyValue_JG.ToString();
- }
- SqlStr = Server.UrlEncode(SqlStr);
- Response.Redirect("MealsManager.aspx?TiaoJian=" + SqlStr);
- }
- }