Example #1
0
 protected void btnEliminar_Click(object sender, EventArgs e)
 {
     if (Convert.ToInt32(Page.Session["IDProducto"]) == 0)
     {
         Response.Write("<script>alert('No hay ningún registro seleccionado')</script>");
     }
     else
     {
         if (ProductosManager.Eliminar(Convert.ToInt32(Page.Session["IDProducto"])) == 0)
         {
             Response.Write("<script>alert('Ocurrió un error al querer eliminar el registro')</script>");
         }
         else
         {
             Response.Write("<script>alert('El registro fue eliminado')</script>");
         }
         ActualizarGrilla();
         Limpiar();
     }
 }
Example #2
0
 private void btnEliminar_Click(object sender, EventArgs e)
 {
     if (IDProducto == 0)
     {
         MessageBox.Show("No hay ningún registro seleccionado");
     }
     else
     {
         if (ProductosManager.Eliminar(IDProducto) == 0)
         {
             MessageBox.Show("Ocurrió un error al querer eliminar el registro");
         }
         else
         {
             MessageBox.Show("El registro fue eliminado");
         }
         ActualizarGrilla();
         Limpiar();
     }
 }
Example #3
0
 // DELETE api/<controller>/5
 public void Delete(int id)
 {
     ProductosManager.Eliminar(id);
 }