Example #1
0
 public Permiso_X_Rol()
 {
     rol = new RolEn();
     permiso = new PermisoEn();
 }
Example #2
0
        public static void RegistrarPermisos(PermisoEn _permiso)
        {
            try
            {
                using (SqlConnection con = DataBaseManager.OpenSqlDatabase(user, pass, servidor, baseDatos))
                {
                    using (SqlCommand command = con.CreateCommand())
                    {
                        command.CommandText = "PA_PERMISOS";
                        command.CommandType = System.Data.CommandType.StoredProcedure;

                        command.Parameters.AddWithValue("@ID_PERMISO", _permiso.Id_permiso);
                        command.Parameters.AddWithValue("@NOMBRE_PERMISO", _permiso.Nombre_permiso);
                        command.Parameters.AddWithValue("@DSC_PERMISO", _permiso.Desc_permiso);

                        command.ExecuteNonQuery();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #3
0
 public Permiso_X_Rol()
 {
     rol     = new RolEn();
     permiso = new PermisoEn();
 }
Example #4
0
 public static void RegistrarPermisos(PermisoEn _permiso)
 {
     try
     {
         ConsultasAd.RegistrarPermisos(_permiso);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }