Пример #1
0
 protected void CreaCategoria_Click(object sender, EventArgs e)
 {
     try
     {
         var registros = Controlasql.Ccreacategoria(Textcategoria.Value.ToUpper(),
                                                    TxtVidaUtil.Value.ToUpper(), Session["USUARIO"].ToString(), Session["BD"].ToString());
         if (registros > 0)
         {
             llenaCategoria();
             SelectCategoria.Focus();
             excepcion.Visible     = false;
             notificacion.Visible  = true;
             txtnotifica.InnerText = "Registro Exitoso";
         }
         else
         {
             serialcantidad.Value = txtserial.Value.ToUpper();
             alertaid.Visible     = true;
         }
     }
     catch (Exception ex)
     {
         notificacion.Visible = false;
         excepcion.Visible    = true;
         error.InnerText      = "No se registro. Error: " + ex.Message;
     }
 }