示例#1
0
        public DataTable sp_updt_funcionesBLL(FuncionesBO funciones)
        {
            DataTable dt = new DataTable();

            try
            {
                dt = new FuncionesDAL().sp_updt_funcionesDAL(funciones);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(dt);
        }
示例#2
0
        public DataTable sp_del_funcionesDAL(FuncionesBO funciones)
        {
            DataTable dt = new DataTable();

            try
            {
                parametros                   = new SqlParameter[1];
                parametros[numParam]         = new SqlParameter("@CODIGO", SqlDbType.Int);
                parametros[numParam++].Value = funciones.Fun_cod;

                dt = new AccesoBDDAL().mtdEjecutaProcedimientoAlmacenadoSel("sp_del_funcion", parametros);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(dt);
        }
示例#3
0
    public static string eliminarFuncion(string codigo)
    {
        int         id           = Convert.ToInt32(codigo);
        DataTable   dt           = new DataTable();
        FuncionesBO func         = new FuncionesBO();
        string      codigostring = "";

        try
        {
            func.Fun_cod = id;
            dt           = new FuncionesBLL().sp_del_funcionesBLL(func);
        }
        catch (Exception ex)
        {
            throw ex;
        }
        codigostring = dt.Rows[0].ItemArray[0].ToString();

        return(codigostring);
    }
示例#4
0
    protected void btnModificar_Click(object sender, EventArgs e)
    {
        if (!ValidarCamposMod())
        {
            return;
        }

        FuncionesBO funcion = new FuncionesBO();

        int    permiso, codigo;
        string nombre;

        codigo  = Convert.ToInt32(txtCodMod.Text);
        nombre  = txtNomMod.Text;
        permiso = int.Parse(ddlPermisoMod.SelectedValue);

        funcion.Fun_cod = codigo;
        funcion.Fun_nom = nombre;
        funcion.Per_cod = permiso;

        DataTable dt = new DataTable();

        try
        {
            dt = new FuncionesBLL().sp_updt_funcionesBLL(funcion);
        }
        catch (Exception ex)
        {
            var visibilityClass = "alert alert-danger";
            var style           = "display:block;";
            mensajeError.Attributes["class"] = visibilityClass;
            mensajeError.Attributes["style"] = style;
            cv_Resultado.Text = "Ocurrio un error al cargar los datos: " + ex.Message;
        }


        limpiarFormulario();
        Response.Redirect("FuncionesDesc.aspx");
    }