Skip to content

Commit

Permalink
Ajustes Feitos na area de estudante
Browse files Browse the repository at this point in the history
Fotos que Yago adicionou, e pesquisas feitas pelo estudante somente no
campo de palavras chaves
  • Loading branch information
idezjobs committed Dec 3, 2012
1 parent 3cb3d82 commit 4c866f8
Show file tree
Hide file tree
Showing 30 changed files with 339 additions and 161 deletions.
Binary file modified IdezJobsWeb/IdezJobsWeb.suo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -248,47 +248,42 @@ public ActionResult ShowUser(int id)

string Description = (from c in _ContextDataVacancy.GetAll<Vacancy>( )
.Where(x => x.Id == id)
select c.Description.ToLower( )).First( );
string[] Letras = Description.Split(new char[] { ' ' });
select c.KeyWords.ToLower( )).First( );
string[] Letras = Description.Split(new char[] { ',' });

IList<Profile> profileUser = _ContextDataVacancy.GetAll<Profile>( ).ToList( );
IList<Profile> listCopy = new List<Profile>( );
int achei = 0;


foreach (var item in profileUser)
{
string IntersectIndividual = (from c in _ContextDataVacancy.GetAll<Profile>( )
.Where(x => x.Code == item.Code)
select c.Interests.ToLower( )).First( );
string[] PalavrasInteresseIndividual = IntersectIndividual.Split(new char[] { ' ' });
foreach (var palavrasDaDescricao in Letras)
select c.KeyWords.ToLower( )).First( );
if (IntersectIndividual != null)
{

foreach (var itemInteresse in PalavrasInteresseIndividual)
string[] PalavrasInteresseIndividual = IntersectIndividual.Split(new char[] { ',' });
foreach (var palavrasDaDescricao in Letras)
{
if (palavrasDaDescricao.Length > 2 && itemInteresse.Length > 2)

foreach (var itemInteresse in PalavrasInteresseIndividual)
{

var list = (from c in profileUser
where palavrasDaDescricao.ToLower( ).Contains(itemInteresse.ToLower( ))
select c).ToList( );

if (list.Count( ) > 0)
{

Profile profileShow = _ContextDataVacancy.Get<Profile>(item.Code);
//profileShow.FirstName = item.FirstName;
//profileShow.PublicUrl = item.PublicUrl;
//profileShow.Pontuacao = item.Pontuacao;
//profileShow.IdUser = item.IdUser;
//profileShow.Headline = item.Headline;
//profileShow.Industry = item.Industry;
//profileShow.Interests = item.Interests;
//profileShow.LastName = item.LastName;
//profileShow.PictureUrl = item.PictureUrl;
achei++;

listCopy.Add(profileShow);
}
}


}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public ActionResult SearchVacancyOpen( )
[HttpPost]
public ActionResult SearchVacancyOpen(string description)
{
string descriptonUpper = description.ToUpper( );
return View("ResultSearch", _ContextoVaga.GetAll<Vacancy>( ).Where(x => x.Description.Contains(descriptonUpper)));
string descriptonUpper = description.ToLower( );
return View("ResultSearch", _ContextoVaga.GetAll<Vacancy>( ).Where(x => x.KeyWords.ToLower( ).Contains(descriptonUpper) && x.Status.Code == 1));
}

public ActionResult ResultSearch( )
Expand All @@ -87,29 +87,50 @@ public ActionResult ShowVacancyProfile( )

string MyProfile = (from c in _ContextoVaga.GetAll<Profile>( )
.Where(x => x.Id == MyToken)
select c.Interests).First( );
select c.KeyWords).First( );

string ListIntersectes = MyProfile;
string[] Letras = ListIntersectes.Split(new char[] { ' ' });
var Query = from w in Letras where w == "," select w;
string[] Letras = MyProfile.Split(new char[] { ' ' });

IList<Vacancy> listVacancy = null;
IList<Vacancy> CopyVacancy = _ContextoVaga.GetAll<Vacancy>( ).ToList( );
int achei = 0;
foreach (var item in Letras)

IList<Vacancy> listVacancy = new List<Vacancy>( );
IList<Vacancy> CopyVacancy = _ContextoVaga.GetAll<Vacancy>( ).Where(x => x.Status.Code == 1).ToList( );
if (true)
{
listVacancy = _ContextoVaga.GetAll<Vacancy>( )
.Where(x => x.Description.Contains(item.ToString( ))).ToList( );

if (listVacancy.Count( ) > 0)
foreach (var item in CopyVacancy)
{
achei++;
CopyVacancy = listVacancy;
}
string KeyVacancy = (from c in _ContextoVaga.GetAll<Vacancy>( )
.Where(x => x.Id == item.Id)
select c.KeyWords.ToLower( )).First( );
if (KeyVacancy != null)
{

}
string[] PalavrasInteresseIndividual = KeyVacancy.Split(new char[] { ',' });
foreach (var palavrasDaDescricao in Letras)
{

foreach (var itemInteresse in PalavrasInteresseIndividual)
{

var list = (from c in CopyVacancy
where palavrasDaDescricao.ToLower( ).Contains(itemInteresse.ToLower( ))
select c).ToList( );

if (list.Count( ) > 0)
{

return View(CopyVacancy);
Vacancy VacancyShow = _ContextoVaga.Get<Vacancy>(item.Id);

listVacancy.Add(VacancyShow);
}


}
}
}
}
}
return View(listVacancy.Distinct( ));
}

}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions IdezJobsWeb/IdezJobsWeb/Content/principal/css/principal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
body {
background-image: url('imagens/bg2.fw.png');
}

#fullScreen {
width: 100%;
height: 100%;
}

#social {
display: inline-block;
}

#estudante {
margin-top: 180px;
margin-left: -180px;
text-align: center;
display: inline-block;
}

#setaEstudante {
margin-top: -200px;
margin-left: 30px;
}

#center {
display: inline-block;
}

#linkedin {
text-align: center;
}

#iJobs {
text-align: center;
margin-top: -230px;
}

#empresa {
text-align: center;
float: right;
margin-right: -190px;
margin-top: -190px;
}

#setaEmpresa {
text-align: center;
margin-left: 590px;
margin-top: -80px;
}

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions IdezJobsWeb/IdezJobsWeb/Content/principal/js/linkedin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
function onLinkedInLoad() {
IN.Event.on(IN, "auth", function () { onLinkedInLogin(); });
IN.Event.on(IN, "logout", function () { onLinkedInLogout(); });
}

function onLinkedInLogin() {
// we pass field selectors as a single parameter (array of strings)
IN.API.Profile("me")
.fields(["id", "firstName", "lastName", "pictureUrl", "publicProfileUrl", "headline", "industry", "interests", "emailAddress", "honors"])
.result(function (result) {
console.log(result);
setLoginBadge(result.values[0]);
var dados = {
id: result.values[0].id
};
console.log("Primeira chamada: " + JSON.stringify(dados));

$.ajax({
type: "POST",
url: "http://localhost:1677/Account/saveUser/",
data: result.values[0],
dataType: 'json',
success: function (result) {
//alert(json.stringify(dados));
if (result.codigo == 1) {
console.log(result.msg);
}
else {
console.log("Ocorreu algum erro!");
console.log(result);
}
}
});

$.ajax({
type: "POST",
url: "http://localhost:1677/Account/saveUser/",
data: result.values[0],
dataType: 'json',
success: function (result) {
//alert(json.stringify(dados));
if (result.codigo == 1) {
console.log(result.msg);
alert("Entrei");
}
else {
console.log("Ocorreu algum erro!");
console.log(result);
}
}
});

window.location = "http://localhost:1677/CommonUser/Home";

});
}

function setSessionBadge() {

}
1 change: 1 addition & 0 deletions IdezJobsWeb/IdezJobsWeb/Content/principal/js/teste.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert("Axei");
Loading

0 comments on commit 4c866f8

Please sign in to comment.