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 WebMain_task_SearchLine : System.Web.UI.UserControl
{
    static string searchurl=@"/china/TaskSearch.aspx";


    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Request["money"] != null)
            {
                MoneyDDL.Items.Insert(0, new ListItem(Request["money"].ToString(), Request["money"].ToString()));
               // this.MoneyDDL.Items.FindByText(Request["money"].ToString()).Selected = true;
          
            }
        }
        catch { }
    }
    protected void TaskListLinkButton2_Click(object sender, EventArgs e)
    {
        //Session["TaskListKeyword"] = TaskListTextBox1.Text;
        //Session["TaskSearchWhere"] = "subject like '%" + TaskListTextBox1.Text+ "%'";
        Response.Redirect(searchurl + "?kw=" + MoneyText.Text);
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {

        //if (MoneyDDL.Text == "<1000")
        //{
        //    Session["TaskSearchWhere"] = "money<=1000";

        //}
        //else
        //{

        //    if (MoneyDDL.Text == ">1000 且 <2000")
        //    {
        //        Session["TaskSearchWhere"] = "money>1000 and money<=2000";

        //    }
        //    else
        //    {
        //        if (MoneyDDL.Text == ">2000 且 <5000")
        //        {
        //            Session["TaskSearchWhere"] = "money>2000 and money<=5000";
        //        }
        //        else
        //        {
        //            Session["TaskSearchWhere"] = "money>5000";
        //        }
        //    }
        //}
        //this.MoneyText.Text = this.MoneyDDL.SelectedItem.Text;
        Response.Redirect(searchurl + "?money=" + this.MoneyDDL.SelectedItem.Text + "&finish=false" + "&kw=" + this.MoneyText.Text);
        
       
    }
}
