Exemplo n.º 1
0
    protected void ddlLOCATIONGROUP_SelectedIndexChanged(object sender, EventArgs e)
    {
        ddlLOCATION.Items.Clear();
        ListItem li = new ListItem("Select LOCATION...", "0");

        ddlLOCATION.Items.Add(li);

        if (ddlLOCATIONGROUP.SelectedValue != "0")
        {
            List <LOCATION> lOCATIONs = new List <LOCATION>();
            //lOCATIONs = LOCATIONManager.GetAllLOCATIONsNotInGroup();
            lOCATIONs = LOCATIONManager.GetAllLOCATIONsNotInGroupByGroupID(int.Parse(ddlLOCATIONGROUP.SelectedValue));
            foreach (LOCATION lOCATION in lOCATIONs)
            {
                string   loc  = lOCATION.COUNTRY + " > " + lOCATION.CITY + " > " + lOCATION.BRANCH + " > " + lOCATION.BRANCH_CODE;
                ListItem item = new ListItem(loc, lOCATION.LOCATIONID.ToString());
                ddlLOCATION.Items.Add(item);
            }
        }
    }