protected void acceptButton_Click(object sender, EventArgs e)
{
try
{
if (this.IsValid)
{
List<string> persAdded = new List<string>();
foreach (ListItem it in permisos_CBList.Items)
{
if (it.Selected == true)
{
persAdded.Add(it.Text);
it.Selected = false;
}
}
AdministradordeSistema admin = new AdministradordeSistema();//tmp-> deberia ser quien este logeado!
Security sec = new Security();
long centro = sec.getCentroId(centros.Text);
admin.crearRol(descripcion_TB.Text, persAdded, centro);
Page.ClientScript.RegisterStartupScript(Page.GetType(), "alert", "alert('Rol Guardado')", true);
LimpiarPage();
}
}
catch (Exception err)
{
Session["Error_Msg"] = err.Message;
Response.Redirect("~/Error.aspx", true);
}
}