protected void btnRegistrar_Click(object sender, EventArgs e) { if (Page.IsValid) { int TS; string msg; if (Convert.ToBoolean(ddlTercioSuperior.SelectedValue) == true) { TS = 1; } else { TS = 0; } Notas Nota = new Notas(txtNombreMateria.Text, Convert.ToDecimal(txtNotaMateria.Text), Convert.ToByte(TS), int.Parse(ddlCiclo.SelectedValue)); if (Notas_Model.Insertar(Nota)) { msg = "Materialize.toast('Nota agregada con exito', 2000, '', function(){ location.href = 'NotasRegistro.aspx'})"; } else { msg = "Materialize.toast('Ha ocurrido un Error',2000)"; } ScriptManager.RegisterStartupScript(Page, Page.GetType(), "confirmLog", msg, true); } }
public static Object VerNotasCiclo(int idCiclo) { List <Notas> notas = Notas_Model.ObtenerNotas(idCiclo); if (notas.Count > 0) { return(notas); } else { return(false); } }