Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DListUsersName.DataSource = DALC.GetDataTable("ID,Username", "AdoptionAdministrators", "");
         DListUsersName.DataBind();
         DListUsersName.Items.Insert(0, new ListItem("--", "-1"));
         LnkOtherApp_Click(null, null);
     }
 }
Exemplo n.º 2
0
    protected void DListOrganization_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DListOrganization.SelectedValue == "0")
        {
            DListUsersName.Enabled    = false;
            DListUsersName.DataSource = null;
            DListUsersName.DataBind();
            DListUsersName.Items.Insert(0, new ListItem("--", "0"));
        }
        else
        {
            DListUsersName.Enabled    = true;
            DListUsersName.DataSource = DALC.GetUserNamesByOrganizationsID(DListOrganization.SelectedValue);
            DListUsersName.DataBind();

            if (DListUsersName.Items.Count < 1)
            {
                DListUsersName.Enabled = false;
            }

            DListUsersName.Items.Insert(0, new ListItem("--", "0"));
        }
    }