コード例 #1
0
    protected void SearchLocationInfo()
    {
        string country = "";
        string city    = "";
        string branch  = "";

        if (ddlCountry.SelectedItem.Value == "0")
        {
            country = "-1";
        }
        else
        {
            country = ddlCountry.SelectedItem.Value;
        }

        if (ddlCity.SelectedItem.Value == "0")
        {
            city = "-1";
        }
        else
        {
            city = ddlCity.SelectedItem.Value;
        }

        if (ddlBranch.SelectedItem.Value == "0")
        {
            branch = "-1";
        }
        else
        {
            branch = ddlBranch.SelectedItem.Value;
        }

        gvLocationInfo.DataSource = LOCATIONManager.GetAllLOCATIONsForSearch(int.Parse(hfAgentID.Value), country, city, branch);
        gvLocationInfo.DataBind();
    }
コード例 #2
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        string country = "";
        string city    = "";
        string branch  = "";

        if (ddlCountry.SelectedItem.Value == "0")
        {
            country = "-1";
        }
        else
        {
            country = ddlCountry.SelectedItem.Value;
        }

        if (ddlCity.SelectedItem.Value == "0")
        {
            city = "-1";
        }
        else
        {
            city = ddlCity.SelectedItem.Value;
        }

        if (ddlBranch.SelectedItem.Value == "0")
        {
            branch = "-1";
        }
        else
        {
            branch = ddlBranch.SelectedItem.Value;
        }

        gvLocationInfo.DataSource = LOCATIONManager.GetAllLOCATIONsForSearch(int.Parse(hfAgentID.Value), country, city, branch).FindAll(x => x.SEQUENCE == 0);
        gvLocationInfo.DataBind();
    }