Exemplo n.º 1
0
 public void TestEliminar()
 {
     CentroFormacionWS.CentrosFormacionServiceClient proxy = new CentroFormacionWS.CentrosFormacionServiceClient();
     CentroFormacionWS.Mensaje MensajeCentroFormacion = proxy.EliminarCentroFormacion(3);
     Assert.IsNotNull(MensajeCentroFormacion);
 }
 protected void gvCentros_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     int codigo = (int)gvCentros.DataKeys[e.RowIndex].Value;
     CentroFormacionWS.CentrosFormacionServiceClient proxy = new CentroFormacionWS.CentrosFormacionServiceClient();
     CentroFormacionWS.Mensaje MensajeCentroFormacion = proxy.EliminarCentroFormacion(codigo);
     if (MensajeCentroFormacion.codigoMensaje == "E")
     {
         ClientScript.RegisterStartupScript(this.GetType(), "Alerta", "<script>$('#mensaje').html(GenerarMensaje('" + MensajeCentroFormacion.textMensaje + "', 'ok'))</script>");
         Limpiar();
     }
     else
     {
         ClientScript.RegisterStartupScript(this.GetType(), "Alerta", "<script>$('#mensaje').html(GenerarMensaje('" + MensajeCentroFormacion.textMensaje + "', 'warning'))</script>");
     }
 }