示例#1
0
        protected void rblIOBox_Changed(object sender, EventArgs e)
        {
            switch (rblIOBox.SelectedValue)
            {
            case "I":
                tbMail.Text = "Mittente";
                UpdMail.Update();
                ddlSottotitolo.Enabled = false;
                ddlTitolo.Enabled      = false;
                ddlStatus.Enabled      = false;
                ddlMarcatori.Enabled   = true;
                ddlInboxStato.Enabled  = true;
                LoadTitoli();
                break;

            case "O":
                tbMail.Text = "Destinatario";
                UpdMail.Update();
                ddlSottotitolo.Enabled = true;
                ddlTitolo.Enabled      = true;
                ddlMarcatori.Enabled   = false;
                ddlStatus.Enabled      = true;
                ddlInboxStato.Enabled  = false;
                break;
            }
            UpdStatus.Update();
            UpdMarcatori.Update();
            UpdTitolo.Update();
            UpdSottotitolo.Update();
            UpdInbox.Update();
            UpdMail.Update();
            CartellaAccess();
        }
示例#2
0
        protected void OnChangeIndex_ddlTitolo(object sender, EventArgs e)
        {
            TitolarioService <SendMail.Model.SottoTitolo> ts = new TitolarioService <SendMail.Model.SottoTitolo>();

            if (ddlTitolo.SelectedItem.Value != "-- Selezionare un titolo --" && ddlTitolo.SelectedItem.Value != string.Empty)
            {
                IList <SendMail.Model.SottoTitolo> sottotitoli = ts.FindByTitolo(int.Parse(ddlTitolo.SelectedItem.Value));
                ddlSottotitolo.DataTextField  = "Nome";
                ddlSottotitolo.DataValueField = "Id";
                ddlSottotitolo.DataSource     = sottotitoli;
                ddlSottotitolo.DataBind();
                ListItem item = new ListItem();
                item.Value    = "";
                item.Text     = "-- Selezionare un sottotitolo --";
                item.Selected = true;
                ddlSottotitolo.Items.Insert(0, item);
                UpdSottotitolo.Update();
            }
        }