protected void rblAuthor_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (rblAuthor.SelectedItem.Text == "Nuevo")
     {
         ent_Auth = bsn_author.checkAuthor(textName.Text, textLastName.Text);
         bsn_write.deleteWrite(ent_Auth.Id, code);
         clean();
         textName.Enabled        = true;
         textLastName.Enabled    = true;
         textNationality.Enabled = true;
         insert = 1;
     }
     else
     {
         listAdd();
         ddlAuthor.AutoPostBack = true;
         insert = 0;
     }
 }
Exemple #2
0
        protected void ddlAuthor_SelectedIndexChanged(object sender, EventArgs e)
        {
            ent_auth = bsn_auth.checkAuthor(textName.Text, textLastName.Text);
            bsn_write.deleteWrite(ent_auth.Id, code);
            int valor = Convert.ToInt32(ddlAuthor.SelectedValue);

            foreach (EntClsAuthor auth in lstAuthor)
            {
                if (auth.Id == valor)
                {
                    ent_auth = auth;
                }
            }
            ShowAuthor(ent_auth);
        }