Commit a158121c by Ajeet Kumar

27-08-2019

parent bea135fc
...@@ -48,6 +48,36 @@ namespace EnvigoHiring.Controllers ...@@ -48,6 +48,36 @@ namespace EnvigoHiring.Controllers
} }
return View(ad); return View(ad);
} }
[CustomAuthorize(Roles = "Admin, Recruiter,User")]
[HttpPost]
public ActionResult position(ApplicantsDetail ad, string id,string btnActivate)
{
if (id != null && id != "")
{
if (!CheckFunc.IsNumeric(id))
{
return RedirectToAction("position", "applicants");
}
ad.PositionID = id.ToInt32();
}
if (btnActivate!=null && btnActivate.Length>0 && btnActivate.Split('_')[0] == "Activate")
{
var ActArray = btnActivate.Split('_');
int CandID = (ActArray.Length > 1) ? ActArray[1].ToString().ToInt32() : 0;
ad.ActivatereOpenApplicant(CandID);
if (CandID == 0)
{
ad.alert("Alert! Please try again", false);
}
}
ad.dtApplicant = ad.DisplayApplicantsByPosition(id.ToInt32());
if (ad.dtApplicant == null || ad.dtApplicant.Rows.Count == 0)
{
return RedirectToAction("position", "applicants");
}
return View(ad);
}
[Route("~/applicants/Interviewerinputs/{ApplicantID}")] [Route("~/applicants/Interviewerinputs/{ApplicantID}")]
[CustomAuthorize(Roles = "Admin, User")] [CustomAuthorize(Roles = "Admin, User")]
public ActionResult Interviewerinputs(int ApplicantID) public ActionResult Interviewerinputs(int ApplicantID)
......
...@@ -15,6 +15,7 @@ namespace EnvigoHiring.Models.Applicants ...@@ -15,6 +15,7 @@ namespace EnvigoHiring.Models.Applicants
{ {
public int CandidateID { get; set; } public int CandidateID { get; set; }
public int PositionID { get; set; } public int PositionID { get; set; }
public int ApplicantID { get; set; }
public string Applicant { get; set; } public string Applicant { get; set; }
public string Position { get; set; } public string Position { get; set; }
public string Email { get; set; } public string Email { get; set; }
...@@ -180,12 +181,33 @@ namespace EnvigoHiring.Models.Applicants ...@@ -180,12 +181,33 @@ namespace EnvigoHiring.Models.Applicants
{ {
FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim(); FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim();
string Subquery = (id > 0) ? " where t.positionID=" + id : ""; string Subquery = (id > 0) ? " where t.positionID=" + id : "";
string query = string.Format(@"select cand.Name,t.positionid,cand.EmailID,cand.Phone,cand.ResumeGoogleLink,cand.ResumeName,t.NoticePeriodDays,pos.DesignationName,pos.UnitName,Pos.Status,ir.Result as InterViewResult,t1.*, string query = string.Format(@"select cand.Name,t.positionid,cand.EmailID,cand.Phone,cand.ResumeGoogleLink,cand.ResumeName,t.NoticePeriodDays,pos.DesignationName,pos.UnitName,Pos.Status,ir.Result as InterViewResult,(select count(1) from tblSuggestedApplicants where positionid=t.PositionID and candidate=t.CandidateID) as SuggestedApplicantCount,
users.UserName as InterviewerName,(select StatusName from tblMasterHiringStatus where HiringID=t.stage) as CStage from tblApplicants t left outer join tblInterviewRounds t1 on (t.ApplicantID=t1.ApplicantID) (Select count(1) from tblInterviewRounds where ApplicantID!=t1.ApplicantID and candidateid=t1.candidateID and SheduledOn>t1.SheduledOn) as NewInterview,t1.*,intstatus.Statusname as InterViewStatusname, users.UserName as InterviewerName,(select StatusName from tblMasterHiringStatus
inner join tblMasterCandidatePool cand on (t.CandidateID=cand.CandidateID) inner join vwPosition pos on (t.PositionID=pos.PositionID) where HiringID=t.stage) as CStage from tblApplicants t left outer join tblInterviewRounds t1 on (t.ApplicantID=t1.ApplicantID) inner join tblMasterCandidatePool cand on (t.CandidateID=cand.CandidateID) inner join vwPosition pos on (t.PositionID=pos.PositionID)
left outer join tblUserLogin users on (t1.Interviewer=users.UserID) left outer join tblMasterInterviewResult ir on (t1.InterViewresult=ir.StatusID) {0} order by t1.SheduledOn desc, t1.RoundType desc", Subquery); left outer join tblUserLogin users on (t1.Interviewer=users.UserID) left outer join tblMasterInterviewResult ir on (t1.InterViewresult=ir.StatusID)
left outer join tblMasterInterviewStatus intstatus on (t1.InterviewStatus=intstatus.InterviewStatusID) {0} order by t1.SheduledOn desc, t1.RoundType desc", Subquery);
return obj.SelectDatatable(query); return obj.SelectDatatable(query);
} }
public void ActivatereOpenApplicant(int ApplicantID)
{
SaveData sv = new SaveData();
SqlParameter[] perm1 = new SqlParameter[2];
perm1[0] = new SqlParameter("@PositionID", PositionID);
perm1[1] = new SqlParameter("@ApplicantID", ApplicantID);
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblSuggestedApplicants_ReOpen", perm1);
if (success1 != null)
{
sv.isSuccess = true;
sv.Message = "<b>Success :</b> Candidate activated successfully.";
}
else
{
sv.isSuccess = false;
sv.Message = "<b>Error :</b> Please try again later.";
}
alert(sv.Message, sv.isSuccess);
}
} }
} }
\ No newline at end of file
...@@ -40,15 +40,14 @@ FROM tblApplicants INNER JOIN ...@@ -40,15 +40,14 @@ FROM tblApplicants INNER JOIN
public DataTable GetApplicantRounds() public DataTable GetApplicantRounds()
{ {
string ApplicantDataQuery = string.Format(@"SELECT tblInterviewRounds.RoundID,tblInterviewRounds.rating, tblInterviewRounds.ApplicantID, tblInterviewRounds.CandidateID, tblInterviewRounds.RoundType, tblInterviewRounds.SheduledOn, tblInterviewRounds.createdate, tblInterviewRounds.updatedate, string ApplicantDataQuery = string.Format(@"select *,(Select count(1) from tblInterviewRounds where ApplicantID!=tbl.ApplicantID and CandidateID=tbl.CandidateID and SheduledOn>tbl.SheduledOn and rank=1 ) as NewInterview from (SELECT tblInterviewRounds.RoundID,
tblInterviewRounds.addedby, tblInterviewRounds.updatedby, tblUserLogin.UserName, tblInterviewRounds.Interviewer, tblMasterInterviewResult.Result, tblInterviewRounds.InterviewResult as ResultID, pos.PositionID,tblInterviewRounds.rating, tblInterviewRounds.ApplicantID, tblInterviewRounds.CandidateID, tblInterviewRounds.RoundType, tblInterviewRounds.SheduledOn, tblInterviewRounds.createdate,
tblInterviewRounds.InterviewStatus as InterviewStatusID, tblInterviewRounds.updatedate, tblInterviewRounds.addedby, tblInterviewRounds.updatedby, tblUserLogin.UserName, tblInterviewRounds.Interviewer, tblMasterInterviewResult.Result, tblInterviewRounds.InterviewResult as ResultID,
tblMasterInterviewStatus.StatusName AS InterviewStatus tblInterviewRounds.InterviewStatus as InterviewStatusID, tblMasterInterviewStatus.StatusName AS InterviewStatus,pos.Status, Rank() over (Partition BY pos.PositionID,tblInterviewRounds.ApplicantID ORDER BY
FROM tblInterviewRounds Left outer JOIN tblInterviewRounds.SheduledOn desc ) Rank FROM tblInterviewRounds Left outer JOIN tblUserLogin ON tblInterviewRounds.Interviewer = tblUserLogin.UserID LEFT OUTER JOIN
tblUserLogin ON tblInterviewRounds.Interviewer = tblUserLogin.UserID LEFT OUTER JOIN tblMasterInterviewStatus ON tblInterviewRounds.InterviewStatus = tblMasterInterviewStatus.InterviewStatusID LEFT OUTER JOIN tblMasterInterviewResult ON tblInterviewRounds.InterviewResult = tblMasterInterviewResult.StatusID
tblMasterInterviewStatus ON tblInterviewRounds.InterviewStatus = tblMasterInterviewStatus.InterviewStatusID LEFT OUTER JOIN inner join tblApplicants apl on (tblInterviewRounds.ApplicantID=apl.ApplicantID) inner join tblPositions pos on (apl.PositionID=pos.PositionID) ) tbl
tblMasterInterviewResult ON tblInterviewRounds.InterviewResult = tblMasterInterviewResult.StatusID where tbl.ApplicantID = {0} order by tbl.roundID asc", ApplicantID);
where tblInterviewRounds.ApplicantID = {0} order by tblInterviewRounds.roundID asc", ApplicantID);
return obj.SelectDatatable(ApplicantDataQuery); return obj.SelectDatatable(ApplicantDataQuery);
} }
...@@ -86,7 +85,7 @@ FROM tblApplicantRating INNER JOIN tblMasterRating ON tblApplicantRat ...@@ -86,7 +85,7 @@ FROM tblApplicantRating INNER JOIN tblMasterRating ON tblApplicantRat
{ {
string status = dt.Rows[0]["interviewstatus"].ToString().Trim(); string status = dt.Rows[0]["interviewstatus"].ToString().Trim();
string RoundType= dt.Rows[0]["RoundType"].ToString().Trim(); string RoundType= dt.Rows[0]["RoundType"].ToString().Trim();
if (status == "6" || status == "2" || status == "3" || status == "" || status == null || RoundType==null || RoundType=="") if (status == "6" || status == "2" || status == "3" || status == "4" || status == "" || status == null || RoundType==null || RoundType=="")
{ {
return false; return false;
} }
......
...@@ -199,7 +199,7 @@ namespace EnvigoHiring.Models.Position ...@@ -199,7 +199,7 @@ namespace EnvigoHiring.Models.Position
,(select count(1) from tblSuggestedApplicants where positionid=t.positionid) as Tcount ,(select count(1) from tblSuggestedApplicants where positionid=t.positionid) as Tcount
,(select count(1) from tblSuggestedApplicants where currentstatus='Approve' and positionid=t.positionid) as TApprvcount from tblPositions t ,(select count(1) from tblSuggestedApplicants where currentstatus='Approve' and positionid=t.positionid) as TApprvcount from tblPositions t
inner join tblMasterDepartment dept on (t.Department=dept.DepartmentID) inner join tblMasterDesignation desg on (t.DesignationID=desg.DesignationID) inner join tblMasterDepartment dept on (t.Department=dept.DepartmentID) inner join tblMasterDesignation desg on (t.DesignationID=desg.DesignationID)
inner join tblMasterUnit unt on (t.Unit=unt.unitID) where t.status='Open' {0} order by t.RequestDate desc", subquery); inner join tblMasterUnit unt on (t.Unit=unt.unitID) where (t.status='Open' or t.status='ReOpen') {0} order by t.RequestDate desc", subquery);
return obj.SelectDatatable(query); return obj.SelectDatatable(query);
} }
public DataTable viewInActivePosition() public DataTable viewInActivePosition()
...@@ -209,7 +209,7 @@ namespace EnvigoHiring.Models.Position ...@@ -209,7 +209,7 @@ namespace EnvigoHiring.Models.Position
,(select count(1) from tblSuggestedApplicants where currentstatus='selected' and positionid=t.positionid) as Tcount ,(select count(1) from tblSuggestedApplicants where currentstatus='selected' and positionid=t.positionid) as Tcount
,(select count(1) from tblSuggestedApplicants where currentstatus='Approve' and positionid=t.positionid) as TApprvcount from tblPositions t ,(select count(1) from tblSuggestedApplicants where currentstatus='Approve' and positionid=t.positionid) as TApprvcount from tblPositions t
inner join tblMasterDepartment dept on (t.Department=dept.DepartmentID) inner join tblMasterDesignation desg on (t.DesignationID=desg.DesignationID) inner join tblMasterDepartment dept on (t.Department=dept.DepartmentID) inner join tblMasterDesignation desg on (t.DesignationID=desg.DesignationID)
inner join tblMasterUnit unt on (t.Unit=unt.unitID) where t.status!='Open' {0} order by t.RequestDate desc",subquery); inner join tblMasterUnit unt on (t.Unit=unt.unitID) where (t.status!='Open' and t.status!='ReOpen') {0} order by t.RequestDate desc", subquery);
return obj.SelectDatatable(query); return obj.SelectDatatable(query);
} }
public List<SelectListItem> DesignationList(string DepartmentID) public List<SelectListItem> DesignationList(string DepartmentID)
...@@ -236,7 +236,14 @@ namespace EnvigoHiring.Models.Position ...@@ -236,7 +236,14 @@ namespace EnvigoHiring.Models.Position
} }
public List<SelectListItem> StatusList() public List<SelectListItem> StatusList()
{ {
return Common.FillSelectListManual("Open", "OnHold", "Closed"); if (Status == "OnHold")
{
return Common.FillSelectListManual("OnHold","ReOpen");
}
else
{
return Common.FillSelectListManual("Open", "OnHold");
}
} }
} }
} }
\ No newline at end of file
@model EnvigoHiring.Models.Applicants.Display @model EnvigoHiring.Models.Applicants.Display
@using CommonFunc; @using CommonFunc;
@{ @{
ViewBag.Title = "viewcandidate"; ViewBag.Title = "viewcandidate";
Layout = "~/Views/Shared/_Layout.cshtml"; Layout = "~/Views/Shared/_Layout.cshtml";
...@@ -70,27 +70,27 @@ ...@@ -70,27 +70,27 @@
<a>@HttpUtility.HtmlDecode(dr["NoticePeriodDays"].ToString().Trim()) Days</a> <a>@HttpUtility.HtmlDecode(dr["NoticePeriodDays"].ToString().Trim()) Days</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>Last Appraised</th> <th>Last Appraised</th>
<td> <td>
<a>@Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("MMM yyyy")</a> <a>@Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("MMM yyyy")</a>
</td> </td>
<th>Last Conatcted</th> <th>Last Conatcted</th>
<td> <td>
<a>@Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("dd MMM yy")</a> <a>@Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("dd MMM yy")</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>ELPA</th> <th>ELPA</th>
<td> <td>
<a>@HttpUtility.HtmlDecode(dr["ExpectedSalary"].ToString().Trim()) Lac (@HttpUtility.HtmlDecode(dr["RaisePercentage"].ToString().Trim())%)</a> <a>@HttpUtility.HtmlDecode(dr["ExpectedSalary"].ToString().Trim()) Lac (@HttpUtility.HtmlDecode(dr["RaisePercentage"].ToString().Trim())%)</a>
</td> </td>
<th>CLPA</th> <th>CLPA</th>
<td> <td>
<a>@HttpUtility.HtmlDecode(dr["CurrentSalary"].ToString().Trim()) Lac</a> <a>@HttpUtility.HtmlDecode(dr["CurrentSalary"].ToString().Trim()) Lac</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>Education </th> <th>Education </th>
<td> <td>
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<tr><th colspan="4">Interview Details</th></tr> <tr><th colspan="4">Interview Details</th></tr>
@*Start Loop*@ @*Start Loop*@
@{var interviewStatus = ""; string RoundType = "";} @{var interviewStatus = ""; string RoundType = ""; int NewInterview=0; string InterviewType = "";}
@if (Model.ApplicantRounds != null && Model.ApplicantRounds.Rows.Count > 0) @if (Model.ApplicantRounds != null && Model.ApplicantRounds.Rows.Count > 0)
{ {
for (int i = 0; i < Model.ApplicantRounds.Rows.Count; i++) for (int i = 0; i < Model.ApplicantRounds.Rows.Count; i++)
...@@ -126,6 +126,8 @@ ...@@ -126,6 +126,8 @@
var dr = Model.ApplicantRounds.Rows[i]; var dr = Model.ApplicantRounds.Rows[i];
interviewStatus = dr["InterviewStatusID"].ToString().Trim(); interviewStatus = dr["InterviewStatusID"].ToString().Trim();
RoundType = Convert.ToString(dr["RoundType"]).Trim(); RoundType = Convert.ToString(dr["RoundType"]).Trim();
NewInterview = dr.SetParamValue("NewInterview").ToInt32();
InterviewType = dr.SetParamValue("Status");
//if (RoundType != null && RoundType != "") //if (RoundType != null && RoundType != "")
{ {
<tr> <tr>
...@@ -133,10 +135,10 @@ ...@@ -133,10 +135,10 @@
<th colspan="2"> <th colspan="2">
@HttpUtility.HtmlDecode(dr["RoundType"].ToString().Trim()) @HttpUtility.HtmlDecode(dr["RoundType"].ToString().Trim())
@if (interviewStatus == "1" ) @if (interviewStatus == "1")
{
using (Html.BeginForm("delete/" + dr["ApplicantID"].ToString().Trim(), null, FormMethod.Post, new { enctype = "multipart/form-data", id = "formdel", @class = "form-horizontal form-label-left" }))
{ {
using (Html.BeginForm("delete/" + dr["ApplicantID"].ToString().Trim(), null, FormMethod.Post, new { enctype = "multipart/form-data", id = "formdel", @class = "form-horizontal form-label-left" }))
{
@Html.AntiForgeryToken() @Html.AntiForgeryToken()
Model.RoundID = dr["RoundID"].ToString().Trim(); Model.RoundID = dr["RoundID"].ToString().Trim();
<button id="delete" type="submit" name="btndelete" value="Delete" style="float:right;" class="btn btn-success">Delete</button> <button id="delete" type="submit" name="btndelete" value="Delete" style="float:right;" class="btn btn-success">Delete</button>
...@@ -181,7 +183,7 @@ ...@@ -181,7 +183,7 @@
} }
} }
} }
@if (interviewStatus == "6" || interviewStatus == "3" || interviewStatus == "2" || RoundType == null || RoundType == "") @if (interviewStatus == "6" || interviewStatus == "3" || interviewStatus == "2" || RoundType == null || RoundType == "" || (InterviewType=="ReOpen" && interviewStatus=="4" && NewInterview==0))
{ {
using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" })) using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" }))
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<li> <li>
<a><i class="fa fa-desktop"></i> Positions <span class="fa fa-chevron-down"></span></a> <a><i class="fa fa-desktop"></i> Positions <span class="fa fa-chevron-down"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
<li><a href="/position/viewposition">View Positions</a></li> <li><a href="/position/viewposition">View Open Positions</a></li>
<li><a href="/position/view-inactive-position">View InActive Positions</a></li> <li><a href="/position/view-inactive-position">View Closed/OnHold Positions</a></li>
@if (role == "Admin" || role == "User") @if (role == "Admin" || role == "User")
{ {
<li><a href="/position/addposition">Add Positions</a></li> <li><a href="/position/addposition">Add Positions</a></li>
......
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
string downloadLink = (resume == "") ? Googleresume : Model.FilePath + "/" + resume; string downloadLink = (resume == "") ? Googleresume : Model.FilePath + "/" + resume;
<tr> <tr>
<td> <td>
<a style="color:green;text-decoration:underline;" href="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</a><br /> <a title="View Applicants interview detail" style="color:green;text-decoration:underline;" href="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</a><br />
<a style="color:green;text-decoration:underline;" href="/applicants/position/@applicant[0].SetParamValue("PositionID").ToInt32()">@applicant[0]["DesignationName"].ToString().Trim().HtmlDecode()</a><br /> <a title="View position Applicants" style="color:green;text-decoration:underline;" href="/applicants/position/@applicant[0].SetParamValue("PositionID").ToInt32()">@applicant[0]["DesignationName"].ToString().Trim().HtmlDecode()</a><br />
@applicant[0]["UnitName"].ToString().Trim().HtmlDecode()<br /> @applicant[0]["UnitName"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["Cstage"].ToString().Trim().HtmlDecode() @applicant[0]["Cstage"].ToString().Trim().HtmlDecode()
</td> </td>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
@using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" })) @using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" }))
{ {
<h2>View Applicants</h2> <h2>View Applicants</h2>
<button type="submit" name="btnDownload" value="Download" id="btnDownload" class="btn btn-app" style="float:right; margin:0 11px 10px 10px;"> <button type="submit" name="btnDownload" value="Download" id="btnDownload" class="btn btn-app" style="float:right; margin:0 11px 10px 10px;">
<i class="fa fa-download" aria-hidden="true"></i> <i class="fa fa-download" aria-hidden="true"></i>
</button> </button>
...@@ -48,61 +49,92 @@ ...@@ -48,61 +49,92 @@
} }
} }
<div class="x_content"> <div class="x_content">
@if (Model.dtApplicant != null && Model.dtApplicant.Rows.Count > 0) @using (Html.BeginForm(null, null, FormMethod.Post, new { enctype = "multipart/form-data", id = "langform", @class = "form-horizontal form-label-left" }))
{ {
<table id="datatable" class="table table-striped table-bordered"> if (Model.lblMessage != null && Model.lblMessage != "")
<thead> {
<tr> <div class="alert alert-@Model.MessageType alert-dismissible fade in" data-valmsg-summary="true" role="alert">
<th>Applicant</th> <button type="button" class="close" data-dismiss="alert" aria-label="Close">
<th>Contact</th> <span aria-hidden="true">×</span>
<th>Round n-1</th> </button>
<th>Round n</th>
<th>Action</th> <ul>
</tr> @if (Html.ViewData.ModelState.IsValid)
</thead>
<tbody>
@{
var applicantList = (from System.Data.DataRow cat in Model.dtApplicant.Rows orderby cat["positionID"] descending select new { ApplicantID = cat["ApplicantID"].ToString().Trim(), positionID = cat["positionID"].ToString().Trim() }).Distinct().ToList();
for (int i = 0; i < applicantList.Count; i++)
{ {
string applicantid = applicantList[i].ApplicantID.ToString().Trim(); @Html.ValidationSummary(false)
string positionID = applicantList[i].positionID.ToString().Trim(); }
var applicant = (from System.Data.DataRow cat in Model.dtApplicant.Rows where cat["ApplicantID"].ToString() == applicantid orderby cat["RoundType"] descending select cat).Take(2).ToList(); @Html.Raw(Model.lblMessage)
string candidateID = applicant[0]["CandidateID"].ToString().Trim(); </ul>
string positionStatus = applicant[0]["Status"].ToString().Trim();
if (applicant != null) </div>
}
else
{
<div class="alert alert-danger alert-dismissible fade in" role="alert" data-valmsg-summary="true" style="display:none;">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<ul>
@Html.ValidationSummary(false)
</ul>
</div>
}
if (Model.dtApplicant != null && Model.dtApplicant.Rows.Count > 0)
{
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>Applicant</th>
<th>Contact</th>
<th>Round n-1</th>
<th>Round n</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@{
var applicantList = (from System.Data.DataRow cat in Model.dtApplicant.Rows orderby cat["positionID"] descending select new { ApplicantID = cat["ApplicantID"].ToString().Trim(), positionID = cat["positionID"].ToString().Trim() }).Distinct().ToList();
for (int i = 0; i < applicantList.Count; i++)
{ {
string resume = applicant[0]["ResumeName"].ToString().Trim().HtmlDecode(); string applicantid = applicantList[i].ApplicantID.ToString().Trim();
string Googleresume = applicant[0]["ResumeGoogleLink"].ToString().Trim().HtmlDecode(); string positionID = applicantList[i].positionID.ToString().Trim();
string downloadLink = (resume == "") ? Googleresume : Model.FilePath + "/" + resume; var applicant = (from System.Data.DataRow cat in Model.dtApplicant.Rows where cat["ApplicantID"].ToString() == applicantid orderby cat["SheduledOn"] descending select cat).Take(2).ToList();
<tr> string candidateID = applicant[0]["CandidateID"].ToString().Trim();
<td> string positionStatus = applicant[0]["Status"].ToString().Trim();
<a style="color:green;text-decoration:underline;" href="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</a><br /> if (applicant != null)
@applicant[0]["DesignationName"].ToString().Trim().HtmlDecode()<br /> {
@applicant[0]["UnitName"].ToString().Trim().HtmlDecode()<br /> string resume = applicant[0]["ResumeName"].ToString().Trim().HtmlDecode();
@applicant[0]["Cstage"].ToString().Trim().HtmlDecode() string Googleresume = applicant[0]["ResumeGoogleLink"].ToString().Trim().HtmlDecode();
</td> string downloadLink = (resume == "") ? Googleresume : Model.FilePath + "/" + resume;
<td> <tr>
@applicant[0]["EmailID"].ToString().Trim().HtmlDecode()<br /> <td>
@applicant[0]["Phone"].ToString().Trim().HtmlDecode()<br /> <a style="color:green;text-decoration:underline;" href="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</a><br />
<a style="color:green;text-decoration:underline;" href="@downloadLink">Resume Link</a><br /> @applicant[0]["DesignationName"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["NoticePeriodDays"].ToString().Trim().HtmlDecode() <br /> @applicant[0]["UnitName"].ToString().Trim().HtmlDecode()<br />
</td> @applicant[0]["Cstage"].ToString().Trim().HtmlDecode()
@if (applicant.Count < 2) </td>
{ <td>
for (int k = 0; k < 2 - applicant.Count; k++) @applicant[0]["EmailID"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["Phone"].ToString().Trim().HtmlDecode()<br />
<a style="color:green;text-decoration:underline;" href="@downloadLink">Resume Link</a><br />
@applicant[0]["NoticePeriodDays"].ToString().Trim().HtmlDecode() <br />
</td>
@if (applicant.Count < 2)
{ {
<td></td> for (int k = 0; k < 2 - applicant.Count; k++)
{
<td></td>
}
} }
} @for (int k = 0; k < applicant.Count; k++)
@for (int k = 0; k < applicant.Count; k++)
{
if (applicant[k]["InterviewerName"].ToString().Trim() != "")
{ {
string ScheduleDate = applicant[k]["SheduledOn"].ToString().Trim(); if (applicant[k]["InterviewerName"].ToString().Trim() != "")
ScheduleDate = (ScheduleDate == "") ? "" : ScheduleDate.ToDateTime().ToString("dd MMM yyyy hh:mm tt"); {
string InterViewResult = applicant[k]["InterViewResult"].ToString().Trim(); string ScheduleDate = applicant[k]["SheduledOn"].ToString().Trim();
InterViewResult = (InterViewResult == "") ? positionStatus : InterViewResult; ScheduleDate = (ScheduleDate == "") ? "" : ScheduleDate.ToDateTime().ToString("dd MMM yyyy hh:mm tt");
string InterViewResult = applicant[k]["InterViewResult"].ToString().Trim();
string InterViewStatusName = applicant[k]["InterViewStatusname"].ToString().Trim();
InterViewResult = (InterViewResult == "") ? InterViewStatusName : InterViewResult;
<td> <td>
Sheduled: @ScheduleDate<br /> Sheduled: @ScheduleDate<br />
Assigned: @applicant[k]["InterviewerName"].ToString().Trim().HtmlDecode()<br /> Assigned: @applicant[k]["InterviewerName"].ToString().Trim().HtmlDecode()<br />
...@@ -110,29 +142,38 @@ ...@@ -110,29 +142,38 @@
Result:@InterViewResult<br /> Result:@InterViewResult<br />
</td> </td>
}
else
{
<td></td>
}
} }
else
{ <td>
<td></td>
} @if ((positionStatus == "Open" || positionStatus == "ReOpen") && applicant[0].SetParamValue("NewInterview").ToInt32() == 0)
} {
<td> <a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br />
Add Comment<br /> <span>Add Comment</span><br />
@if (positionStatus == "Open") }
{ @if (applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() == 0)
<a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br /> {
} <button title='Activate Applicant' class="btn btn-success btn-xs" name="btnActivate" style='cursor:pointer;' value="Activate_@applicantid">
@positionStatus<br /> Activate
</td> </button>
</tr> }
@*@positionStatus<br />*@
</td>
</tr>
}
} }
}
}
</tbody>
</table>
} }
</tbody>
</table>
}
}
</div> </div>
@section script{ @section script{
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<ul> <ul>
@if (Html.ViewData.ModelState.IsValid) @if (Html.ViewData.ModelState.IsValid)
{ {
@Html.ValidationSummary(false) @Html.ValidationSummary(false)
} }
@Html.Raw(Model.lblMessage) @Html.Raw(Model.lblMessage)
</ul> </ul>
...@@ -104,14 +104,21 @@ ...@@ -104,14 +104,21 @@
</div> </div>
if (Model.PositionID > 0) if (Model.PositionID > 0)
{ {
<div class="item form-group"> <div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="PassingYear"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="PassingYear">
Position Status <span class="required">*</span> Position Status <span class="required">*</span>
</label> </label>
<div class="col-md-6 col-sm-6 col-xs-12"> <div class="col-md-6 col-sm-6 col-xs-12">
@Html.DropDownListFor(m => m.Status, Model.StatusList(), "Select Status", new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" }) @if (Model.Status == "Closed")
{
@Html.DisplayFor(m=>m.Status)
}
else
{
@Html.DropDownListFor(m => m.Status, Model.StatusList(), "Select Status", new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
}
</div>
</div> </div>
</div>
} }
<div class="ln_solid"></div> <div class="ln_solid"></div>
<div class="form-group"> <div class="form-group">
......
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
<td>@Html.Raw(BasicFunc.SetParamValue(row, "TAT").ToDateTime().ToString("dd, MMM yyyy"))</td> <td>@Html.Raw(BasicFunc.SetParamValue(row, "TAT").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "ClosedByDate").ToDateTime().ToString("dd, MMM yyyy"))</td> <td>@Html.Raw(BasicFunc.SetParamValue(row, "ClosedByDate").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td> <td>
@if (row.SetParamValue("status").ToLower() != "open") @if (row.SetParamValue("status").ToLower() != "open" && row.SetParamValue("status").ToLower() != "reopen")
{ {
if (row.SetParamValue("status").ToLower() != "OnHold") if (row.SetParamValue("status").ToLower() != "Onhold")
{ {
<a title='Edit Record' style='cursor:pointer;' href='/position/addposition/@row["PositionID"].ToString().Trim()'> <i class='fa fa-edit'></i></a> <a title='Edit Record' style='cursor:pointer;' href='/position/addposition/@row["PositionID"].ToString().Trim()'> <i class='fa fa-edit'></i></a>
} }
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
background: rgba(255,0,0,.85); background: rgba(255,0,0,.85);
text-align: center; text-align: center;
} }
</style> </style>
} }
@section PageHeading{ @section PageHeading{
...@@ -80,7 +79,16 @@ ...@@ -80,7 +79,16 @@
<td>@Html.Raw(BasicFunc.SetParamValue(row, "PositionID"))</td> <td>@Html.Raw(BasicFunc.SetParamValue(row, "PositionID"))</td>
<td> <td>
<strong>Department:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "DepartmentName"))<br /> <strong>Department:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "DepartmentName"))<br />
<strong>Designation:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "DesignationName"))<br /> @if (row.SetParamValue("status").ToLower() == "reopen")
{
<strong>Designation:</strong><a title="View Applicants interview detail" style="color:green;text-decoration:underline;" href="/applicants/position/@row.SetParamValue("PositionID").ToInt32()">
@Html.Raw(BasicFunc.SetParamValue(row, "DesignationName"))
</a><br />
}
else
{
<strong>Designation:</strong>@Html.Raw(BasicFunc.SetParamValue(row, "DesignationName"))<br />
}
<strong>Unit:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "UnitName")) <strong>Unit:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "UnitName"))
</td> </td>
...@@ -90,7 +98,7 @@ ...@@ -90,7 +98,7 @@
<td>@Html.Raw(BasicFunc.SetParamValue(row, "TAT").ToDateTime().ToString("dd, MMM yyyy"))</td> <td>@Html.Raw(BasicFunc.SetParamValue(row, "TAT").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "ClosedByDate").ToDateTime().ToString("dd, MMM yyyy"))</td> <td>@Html.Raw(BasicFunc.SetParamValue(row, "ClosedByDate").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td> <td>
@if (row.SetParamValue("status").ToLower() == "open") @if (row.SetParamValue("status").ToLower() == "open" || row.SetParamValue("status").ToLower() == "reopen")
{ {
if (role == "Admin" || role == "User") if (role == "Admin" || role == "User")
{ {
...@@ -103,20 +111,20 @@ ...@@ -103,20 +111,20 @@
{ {
if (role == "Admin" || role == "Recruiter") if (role == "Admin" || role == "Recruiter")
{ {
<a title='Share Resume' style='cursor:pointer;' href='/candidateselection/select/@row["PositionID"].ToString().Trim()'> <a title='Share Resume' style='cursor:pointer;' href='/candidateselection/select/@row["PositionID"].ToString().Trim()'>
<span class="p1 fa-stack fa-2x has-badge" style="font-size:1.2em; min-width: 1em;width: 2em;" data-count="@row.SetParamValue("Tapprvcount")/@row.SetParamValue("tcount")"> <span class="p1 fa-stack fa-2x has-badge" style="font-size:1.2em; min-width: 1em;width: 2em;" data-count="@row.SetParamValue("Tapprvcount")/@row.SetParamValue("tcount")">
<i class="p3 fa fa-share-alt fa-stack-1x xfa-inverse"></i> <i class="p3 fa fa-share-alt fa-stack-1x xfa-inverse"></i>
</span> </span>
</a> </a>
} }
if (role == "Admin" || role == "User") if (role == "Admin" || role == "User")
{ {
<a title='Shared Resume' style='cursor:pointer;' href='/candidateselection/approve/@row["PositionID"].ToString().Trim()'> <a title='Shared Resume' style='cursor:pointer;' href='/candidateselection/approve/@row["PositionID"].ToString().Trim()'>
<span class="p1 fa-stack fa-2x has-badge" style="font-size:1.2em" data-count="@row.SetParamValue("Tapprvcount")/@row.SetParamValue("tcount")"> <span class="p1 fa-stack fa-2x has-badge" style="font-size:1.2em" data-count="@row.SetParamValue("Tapprvcount")/@row.SetParamValue("tcount")">
<i class="p3 fa fa-slideshare fa-stack-1x xfa-inverse"></i> <i class="p3 fa fa-slideshare fa-stack-1x xfa-inverse"></i>
</span> </span>
</a> </a>
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment