예제 #1
0
    protected void SearchButton_Click(object sender, EventArgs e)
    {
        string fieldValue = SearchTextBox.Text;
        string CheckBox   = SearchDropDownList.Text;

        if (CheckBox == "Name")
        {
            GridViewFriendsList.DataSource = FriendsBLL.FindByListName(Userid, fieldValue, Global.CONFIRMED);
        }

        if (CheckBox == "CurrrentCity")
        {
            GridViewFriendsList.DataSource = FriendsBLL.FindByListCurrent(Userid, fieldValue, Global.CONFIRMED);
        }

        if (CheckBox == "HomeTown")
        {
            GridViewFriendsList.DataSource = FriendsBLL.FindByListHomeTown(Userid, fieldValue, Global.CONFIRMED);
        }

        if (CheckBox == "School")
        {
            GridViewFriendsList.DataSource = FriendsBLL.FindByListSchool(Userid, fieldValue, Global.CONFIRMED);
        }

        if (CheckBox == "WorkPlace")
        {
            GridViewFriendsList.DataSource = FriendsBLL.FindByListWorkPlace(Userid, fieldValue, Global.CONFIRMED);
        }
        GridViewFriendsList.DataBind();
    }