The project ‘NEETs in NEED’ was created in cooperation of partners coming from Bulgaria, FYR Macedonia, Greece and Uruguay with main goal to activate inactive young people through non-formal based activities being delivered primary by non-governmental organizations with cooperation of all sectors. The project focus on raising competencies of the organizations to address the needs of NEETs who can be consider to be one of the most vulnerable groups.
In overall, the project is designed in line with following objectives:

– To raise capacities of participating organizations and the participants to effectively address the
needs and interests of NEETs in their communities and through implementing various activities
involving representatives of other sectors to contribute to their full development;
– To strengthen knowledge of the organizations and the participants on NEETs as diverse group
of young people with very different profiles and level of motivation;
– To raise the participants abilities to effectively include NEETs in their activities and motivate
them to work on development of their competencies including the ones that they could apply in
job seeking process or in the process of establishing own enterprise;
– To support sharing lessons learned across participating countries and developing new tools
that could be apply at their work with NEETs;
– To increase participants understanding of the concept of entrepreneurship and social
entrepreneurship and to develop participants abilities to work on development entrepreneurial
competencies of NEETs,
– To increase understanding of the participating organizations and the participants on Erasmus +
Programme and encourage development of new project ideas addressing the needs of NEETs;
– To develop set of competencies of the participants in area of teamwork, leaderships,
communication and problem solving that they can apply at their working practices in the
process of delivering more quality activities.

The set objectives will be meet through series of workshops (capacity building activities) that will deliver each partner in their local communities and through four mobility activities (Coordination Meeting, two Training Courses and Seminar) that will be realized in Uruguay, Bulgaria, FYR Macedonia and Greece respectively.

public class ProffessorsController : Controller

{

private ApplicationDbContext _context;

 

public ProffessorsController()

{

_context = new ApplicationDbContext();

}

 

protected override void Dispose(bool disposing)

{

_context.Dispose();

}

public ActionResult NewProfessor()

{

Professor model = new Professor();

return View();

}

 

public ActionResult Details(int id)

{

var prof = _context.Proffessors.SingleOrDefault(p => p.Id == id);

return View(prof);

}

 

public ActionResult InsertProfessor(Professor model)

{

if (!ModelState.IsValid)

{

return View(“NewProfessor”);

}

_context.Proffessors.Add(model);

_context.SaveChanges();

return RedirectToAction(“Index”);

}

public ActionResult EditProfesor(int id)

{

var prof = _context.Proffessors.SingleOrDefault(p=>p.Id==id);

 

return View(prof);

}

public ActionResult DeleteProfesor(int id)

{

var prof = _context.Proffessors.SingleOrDefault(p => p.Id == id);

_context.Proffessors.Remove(prof);

_context.SaveChanges();

return RedirectToAction(“Index”);

}

 

public ActionResult UpdateProfessor(Professor model)

{

var prof = _context.Proffessors.SingleOrDefault(p => p.Id == model.Id);

prof.Name = model.Name;

prof.SlikaUrl = model.SlikaUrl;

prof.Godini = model.Godini;

_context.SaveChanges();

return RedirectToAction(“Index”);

}

 

// GET: Proffessors

public ActionResult Index()

{

return View(_context.Proffessors.ToList());

}

}

—————————————————————————————–

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>

{

public DbSet<Professor> Proffessors { get; set; }.

—————————————————————————————–

@section scripts{

<script>

$(document).ready(function(){

$(“#table”).dataTable();

 

$(“.js-delete”).click(function () {

var button = $(this);

bootbox.confirm(“Are you sure you want to delete this?”, function (result) {

if (result) {

$.ajax({

url: “/Proffessors/DeleteProfesor/” + button.attr(“professor-data-id”),

success: function () {

button.parents(“tr”).remove();

location.reload();

}

})

}

});

})

});

</script>

}

———————————————————————————————————————————————————-

[Authorize(Roles = “Administrator”)]
[HttpGet]

public ActionResult AddUserToRole()

{

var model = new AddUserToRoleViewModel()

{

Email = string.Empty,

Roles = new List<string>() {“Administrator”, “Manager”, “User”},

SelectedRole = string.Empty

};

return View(model);

}

 

[Authorize(Roles = “Administrator”)]
[HttpPost]

public ActionResult AddUserToRole(AddUserToRoleViewModel model)

{

if (ModelState.IsValid)

{

var user = UserManager.Users.FirstOrDefault(usr => usr.Email == model.Email);

if (user == null)

return HttpNotFound($”User {model.Email} not found”);

 

UserManager.AddToRole(user.Id, model.SelectedRole);

return RedirectToAction(“Index”, “Friends”);

}

 

return View(model);

}

———————————————————————————————————————————————————-

public class AddUserToRoleViewModel

{

[Required]

public string Email { get; set; }

public List<string> Roles { get; set; }

[Required]

public string SelectedRole { get; set; }

}

 

Vo AccountViewModel dodadi:

 

publicclassAddUserRoleViewModel

{

publicstring Email { get; set; }

public List<string> Roles { get; set; }

publicstring SelectedRole { get; set; }

}

 

Vo AccountController:

public ActionResult AddUserToRole()

{

 

var model = new AddUserRoleViewModel()

{

Roles = new List<string>{ “Administrator”, “Manager”, “User” }

};

 

return View(model);

}

 

public ActionResult AddUserToRole1(AddUserRoleViewModel model) {

 

if (ModelState.IsValid) {

var user = UserManager.Users.SingleOrDefault(usr => usr.Email == model.Email);

 

if (user == null)

{

return HttpNotFound();

}

UserManager.AddToRole(user.Id, model.SelectedRole);

 

return RedirectToAction(“Index”, “Friends”);

 

}

 

return View(model);

 

}

 

 

 

 

 

 

 

Napravi View AddUserToRole

@model LabaratoriskiTest.Models.AddUserRoleViewModel

@{

ViewBag.Title = “AddUserToRole”;

Layout = “~/Views/Shared/_Layout.cshtml”;

}

 

<h2>AddUserToRole</h2>

 

@using (Html.BeginForm(“AddUserToRole1”, “Account”))

{

<divclass=”form-group”>

@Html.LabelFor(model => model.Email)

@Html.TextBoxFor(model => model.Email, new { @class = “form-control” })

</div>

<divclass=”form-group”>

@Html.LabelFor(model => model.SelectedRole)

@Html.DropDownListFor(model => model.SelectedRole, new SelectList(Model.Roles), new { @class = “form-control” })

</div>

 

<buttontype=”submit”class=”btn btn-primary”>Save</button>

}

 

 

I vo AspNetRoles manuelno da se dodat roles vo tabelata

%d bloggers like this: