Exemplo n.º 1
0
        protected void btnIngresar_Click(object sender, EventArgs e)
        {
            CategoriaProducto cp = new CategoriaProducto();
            char estatus         = 'F';

            if (rdoActivo.Checked == true)
            {
                estatus = 'T';
            }
            bool resultado = cp.CrearCategoriaProductoSQL(txtNombre.Text, estatus);

            if (resultado)
            {
                Response.Redirect(Request.RawUrl);
            }
            else
            {
                Response.Write(@"<script language='javascript'>alert('Problemas! categoria de productos no creada.');</script>");
            }
        }