Commit 885c4edc by Ajeet Kumar

02-09-2019

parent c514a36d
...@@ -79,11 +79,25 @@ namespace EnvigoHiring.Controllers ...@@ -79,11 +79,25 @@ namespace EnvigoHiring.Controllers
} }
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public ActionResult delete(int ID, Display applicant) public ActionResult delete(int ID, Display applicant, string btndelete)
{ {
applicant.ApplicantID = ID; if (btndelete == "Delete")
applicant.deleteround(); {
return RedirectToAction("index/" + ID.ToString(), "AppicantDisplayAll"); applicant.ApplicantID = ID;
applicant.deleteround();
}
return RedirectToAction("index/" + ID.ToString(), "applicantdisplayall");
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult interviewstatus(int ID, Display applicant,string btnIntrvwStatus)
{
if (btnIntrvwStatus == "ChangeStatus")
{
applicant.ApplicantID = ID;
applicant.UpdateInterviewStatus();
}
return RedirectToAction("index/" + ID.ToString(), "applicantdisplayall");
} }
} }
} }
\ No newline at end of file
using ASPSnippets.GoogleAPI; using ASPSnippets.GoogleAPI;
using EnvigoHiring.Models.Login; using EnvigoHiring.Models.Login;
using System;
using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Security;
namespace EnvigoHiring.Controllers namespace EnvigoHiring.Controllers
{ {
...@@ -8,7 +11,6 @@ namespace EnvigoHiring.Controllers ...@@ -8,7 +11,6 @@ namespace EnvigoHiring.Controllers
{ {
// GET: login // GET: login
public ActionResult Index(string code,string ReturnUrl) public ActionResult Index(string code,string ReturnUrl)
{ {
LoginModel lm = new LoginModel(); LoginModel lm = new LoginModel();
//lm.IsAntiForgery = false; //lm.IsAntiForgery = false;
...@@ -39,7 +41,33 @@ namespace EnvigoHiring.Controllers ...@@ -39,7 +41,33 @@ namespace EnvigoHiring.Controllers
} }
public ActionResult thankyou() public ActionResult thankyou()
{ {
string emails = CommonFunctions.getadminemailid(1);
if (emails.Length > 0)
{
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "New User Sign-In!");
StrMail = StrMail.Replace("$$Content$$", Request.QueryString["email"] + " has been signed up on Envigo Hiring application, Please review and assign a role.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("New Signin Request - Envigo Hiring", emails, StrMail);
}
//Email_Send
return View(); return View();
} }
public ActionResult logout()
{
try
{
FormsAuthentication.SignOut();
GoogleConnect.Clear();
return RedirectToAction("index", "login");
}
catch
{
throw;
}
}
} }
} }
\ No newline at end of file
...@@ -66,6 +66,7 @@ namespace EnvigoHiring.Models.Applicants ...@@ -66,6 +66,7 @@ namespace EnvigoHiring.Models.Applicants
Interviewdate = row.SetParamValue("SheduledOn").ToDateTime().ToString("MM/dd/yyyy hh:mm"); Interviewdate = row.SetParamValue("SheduledOn").ToDateTime().ToString("MM/dd/yyyy hh:mm");
Interviewer = row.SetParamValue("Interviewer"); Interviewer = row.SetParamValue("Interviewer");
ddlInterviewStage = row.SetParamValue("Stage"); ddlInterviewStage = row.SetParamValue("Stage");
ApplicantID= row.SetParamValue("ApplicantID").ToInt32();
if (ddlInterviewRound!="") if (ddlInterviewRound!="")
{ {
HideInterview = true; HideInterview = true;
...@@ -171,17 +172,18 @@ namespace EnvigoHiring.Models.Applicants ...@@ -171,17 +172,18 @@ namespace EnvigoHiring.Models.Applicants
{ {
FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim(); FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim();
string Subquery=(id>0)?" where t.candidateID="+id:""; string Subquery=(id>0)?" where t.candidateID="+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,t1.RoundID,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 DataTable DisplayApplicantsByPosition(int id = 0) public DataTable DisplayApplicantsByPosition(int id = 0)
{ {
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,(select count(1) from tblSuggestedApplicants where positionid=t.PositionID and candidate=t.CandidateID) as SuggestedApplicantCount, string query = string.Format(@"select cand.Name,t1.RoundID,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,
(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 (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
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) 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) left outer join tblUserLogin users on (t1.Interviewer=users.UserID) left outer join tblMasterInterviewResult ir on (t1.InterViewresult=ir.StatusID)
......
...@@ -12,7 +12,7 @@ namespace EnvigoHiring.Models.Applicants ...@@ -12,7 +12,7 @@ namespace EnvigoHiring.Models.Applicants
public DataTable ApplicantData { get; set; } public DataTable ApplicantData { get; set; }
public DataTable ApplicantRounds { get; set; } public DataTable ApplicantRounds { get; set; }
public DataTable RoundsRating { get; set; } public DataTable RoundsRating { get; set; }
public string interviewStatus { get; set; }
public string MessageType { get; set; } public string MessageType { get; set; }
public string lblMessage { get; set; } public string lblMessage { get; set; }
public List<SelectListItem> UserList { get; set; } public List<SelectListItem> UserList { get; set; }
...@@ -42,6 +42,7 @@ FROM tblApplicants INNER JOIN ...@@ -42,6 +42,7 @@ FROM tblApplicants INNER JOIN
{ {
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, 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,
pos.PositionID,tblInterviewRounds.rating, tblInterviewRounds.ApplicantID, tblInterviewRounds.CandidateID, tblInterviewRounds.RoundType, tblInterviewRounds.SheduledOn, tblInterviewRounds.createdate, pos.PositionID,tblInterviewRounds.rating, tblInterviewRounds.ApplicantID, tblInterviewRounds.CandidateID, tblInterviewRounds.RoundType, tblInterviewRounds.SheduledOn, tblInterviewRounds.createdate,
(select count(1) from tblSuggestedApplicants where positionid=pos.PositionID and candidate=tblInterviewRounds.CandidateID) as SuggestedApplicantCount,
tblInterviewRounds.updatedate, tblInterviewRounds.addedby, tblInterviewRounds.updatedby, tblUserLogin.UserName, tblInterviewRounds.Interviewer, tblMasterInterviewResult.Result, tblInterviewRounds.InterviewResult as ResultID, tblInterviewRounds.updatedate, tblInterviewRounds.addedby, tblInterviewRounds.updatedby, tblUserLogin.UserName, tblInterviewRounds.Interviewer, tblMasterInterviewResult.Result, tblInterviewRounds.InterviewResult as ResultID,
tblInterviewRounds.InterviewStatus as InterviewStatusID, tblMasterInterviewStatus.StatusName AS InterviewStatus,pos.Status, Rank() over (Partition BY pos.PositionID,tblInterviewRounds.ApplicantID ORDER BY tblInterviewRounds.InterviewStatus as InterviewStatusID, tblMasterInterviewStatus.StatusName AS InterviewStatus,pos.Status, Rank() over (Partition BY pos.PositionID,tblInterviewRounds.ApplicantID ORDER BY
tblInterviewRounds.SheduledOn desc ) Rank FROM tblInterviewRounds Left outer JOIN tblUserLogin ON tblInterviewRounds.Interviewer = tblUserLogin.UserID LEFT OUTER JOIN tblInterviewRounds.SheduledOn desc ) Rank FROM tblInterviewRounds Left outer JOIN tblUserLogin ON tblInterviewRounds.Interviewer = tblUserLogin.UserID LEFT OUTER JOIN
...@@ -126,6 +127,26 @@ createdate,addedby) values (" + ApplicantID + ", (select candidateID from tblApp ...@@ -126,6 +127,26 @@ createdate,addedby) values (" + ApplicantID + ", (select candidateID from tblApp
} }
public bool UpdateInterviewStatus()
{
string Query = string.Format("update tblInterviewRounds set InterviewStatus={0} where ApplicantID = {1} and RoundID={2}", interviewStatus,ApplicantID, RoundID);
int i = obj.ExecuteNonQuery(Query);
if (i > 0)
{
return true;
}
else
{
return false;
}
}
public List<SelectListItem> InterViewStatusList()
{
string Query = "Select InterviewStatusID,StatusName from tblMasterInterviewStatus where InterviewStatusID<4";
return Common.FillSelectList(Query, "StatusName", "InterviewStatusID");
}
} }
} }
\ No newline at end of file
...@@ -45,6 +45,11 @@ namespace EnvigoHiring.Models.Applicants ...@@ -45,6 +45,11 @@ namespace EnvigoHiring.Models.Applicants
} }
public void SaveData() public void SaveData()
{ {
if (ddlInterViewStatus.ToInt32() == 1)
{
alert("Alert! Change interview status", false);
return;
}
SqlParameter[] perm1 = new SqlParameter[16]; SqlParameter[] perm1 = new SqlParameter[16];
perm1[0] = new SqlParameter("@RoundID", RoundID.ToInt32()); perm1[0] = new SqlParameter("@RoundID", RoundID.ToInt32());
perm1[1] = new SqlParameter("@ApplicantID", ApplicantdID.ToInt32()); perm1[1] = new SqlParameter("@ApplicantID", ApplicantdID.ToInt32());
...@@ -89,7 +94,7 @@ namespace EnvigoHiring.Models.Applicants ...@@ -89,7 +94,7 @@ namespace EnvigoHiring.Models.Applicants
public List<SelectListItem> InterViewStatusList() public List<SelectListItem> InterViewStatusList()
{ {
string query = "select InterviewStatusID,StatusName from tblMasterInterviewStatus"; string query = "select InterviewStatusID,StatusName from tblMasterInterviewStatus where role=3";
return Common.FillSelectList(query, "StatusName", "InterviewStatusID"); return Common.FillSelectList(query, "StatusName", "InterviewStatusID");
} }
public List<SelectListItem> ResultStatusList() public List<SelectListItem> ResultStatusList()
......
using Google.Apis.Auth.OAuth2;
using Google.Apis.Calendar.v3;
using Google.Apis.Calendar.v3.Data;
using Google.Apis.Services;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Web;
namespace EnvigoHiring.Models.Calendar
{
public class Calendar
{
static string[] Scopes = { "https://www.googleapis.com/auth/calendar.events", "https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly" };
static string ApplicationName = "Envigo Recruiter Login";
public void Method(string email, string text)
{
ServiceAccountCredential credentials = GoogleCredential.FromFile(HttpContext.Current.Server.MapPath("client-service.json")).CreateScoped(Scopes).UnderlyingCredential as ServiceAccountCredential;
if (credentials.RequestAccessTokenAsync(CancellationToken.None).Result)
{
}
//UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
// new ClientSecrets
// {
// ClientId = "261213523242-fjma3ocn8aes9dda9grlu15jpmkti799.apps.googleusercontent.com",
// ClientSecret = "c2btFMstqHWoVi2qi7QgdrpQ",
// },
// new[] { CalendarService.Scope.Calendar },
// "user",
// CancellationToken.None).Result;
// Create the service.
var service = new CalendarService(new BaseClientService.Initializer()
{
HttpClientInitializer = credentials,
ApplicationName = "Calendar API Sample",
});
//UserCredential credential;
//using (var stream =
// new FileStream(HttpContext.Current.Server.MapPath("credentials.json"), FileMode.Open, FileAccess.Read))
//{
// // The file token.json stores the user's access and refresh tokens, and is created
// // automatically when the authorization flow completes for the first time.
// string credPath = "token.json";
// credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
// clie
// GoogleClientSecrets.Load(stream).Secrets,
// Scopes,
// "user",
// CancellationToken.None,
// new FileDataStore(HttpContext.Current.Server.MapPath(credPath), true)).Result;
//}
// Create Google Calendar API service.
//var service = new CalendarService();
Event myEvent = new Event
{
Summary = "Interview Schedule",
Location = "Envigo Office",
Description = "Interview Scheduled with Ajeet",
Start = new EventDateTime()
{
DateTime = new DateTime(2019, 8, 27, 10, 5, 3),
TimeZone = "Asia/Kolkata"
},
End = new EventDateTime()
{
DateTime = new DateTime(2019, 8, 27, 10, 35, 4),
TimeZone = "Asia/Kolkata"
},
// Recurrence = new String[] {
// "RRULE:FREQ=WEEKLY;BYDAY=MO"
//},
Attendees = new List<EventAttendee>()
{
new EventAttendee() { Email = "vivek@envigo.co.uk" }
}
};
Event recurringEvent = service.Events.Insert(myEvent, "primary").Execute();
}
}
}
\ No newline at end of file
...@@ -159,7 +159,7 @@ namespace EnvigoHiring.Models.CandidatePool ...@@ -159,7 +159,7 @@ namespace EnvigoHiring.Models.CandidatePool
/* Upload Banner Image */ /* Upload Banner Image */
if (flResumeName != null) if (flResumeName != null)
{ {
ResumeName = (ResumeName != null && ResumeName != "") ? ResumeName : UploadFunc.CustomFileName(flResumeName,Users.LoginDetail().UserName); ResumeName = (ResumeName != null && ResumeName != "") ? ResumeName : UploadFunc.CustomFileName(flResumeName, CandidateName);
vm = UploadFunc.SaveFile(flResumeName, FilePath, ResumeName, ".pdf, .doc, .docx"); vm = UploadFunc.SaveFile(flResumeName, FilePath, ResumeName, ".pdf, .doc, .docx");
if (!vm.isValid) if (!vm.isValid)
{ {
...@@ -216,13 +216,11 @@ namespace EnvigoHiring.Models.CandidatePool ...@@ -216,13 +216,11 @@ namespace EnvigoHiring.Models.CandidatePool
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Page added successfully."; sv.Message = "<b>Success :</b> Page added successfully.";
} }
else else
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Page updated successfully."; sv.Message = "<b>Success :</b> Page updated successfully.";
} }
} }
else else
......
...@@ -78,7 +78,26 @@ namespace EnvigoHiring.Models.CandidateSelection ...@@ -78,7 +78,26 @@ namespace EnvigoHiring.Models.CandidateSelection
if (success1 != null) if (success1 != null)
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Candidate List Shared successfully."; sv.Message = "<b>Success :</b> Candidate approved successfully.";
string email = CommonFunctions.getadminemailid(4);
if (email.Length > 0)
{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "Resume selected by user!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> Resumes has been selected by "+ Users.LoginDetail().UserName + " on position " + dt.Rows[0]["DesignationName"] + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> for next step.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("Resumes for Position - " + dt.Rows[0]["DesignationName"] + "", email, StrMail);
}
} }
else else
{ {
...@@ -99,7 +118,27 @@ namespace EnvigoHiring.Models.CandidateSelection ...@@ -99,7 +118,27 @@ namespace EnvigoHiring.Models.CandidateSelection
if (success1 != null) if (success1 != null)
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Candidate List rejected successfully."; sv.Message = "<b>Success :</b> Candidate rejected successfully.";
string email = CommonFunctions.getadminemailid(4);
if (email.Length > 0)
{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "Resume rejected by User!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> Resumes has been rejected by "+ Users.LoginDetail().UserName + " on position " + dt.Rows[0]["DesignationName"] + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> for next step.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("Resumes for Position - " + dt.Rows[0]["DesignationName"] + "", email, StrMail);
}
} }
else else
{ {
......
...@@ -90,6 +90,28 @@ namespace EnvigoHiring.Models.CandidateSelection ...@@ -90,6 +90,28 @@ namespace EnvigoHiring.Models.CandidateSelection
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Candidate List selected successfully."; sv.Message = "<b>Success :</b> Candidate List selected successfully.";
//string email = CommonFunctions.getadminemailid(4);
//if (email.Length > 0)
//{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "Resume shared by recruiter!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> Resumes has been shared by Recruiter on position " + dt.Rows[0]["DesignationName"] + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> to review.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("Resumes for Position - " + dt.Rows[0]["DesignationName"] + "", dt.Rows[0]["Useremail"].ToString().Trim(), StrMail);
//}
} }
else else
{ {
......
...@@ -323,7 +323,7 @@ public class Common ...@@ -323,7 +323,7 @@ public class Common
// //
} }
public class gallerylist public class gallerylist
{ {
......
...@@ -983,34 +983,40 @@ System.UInt32 dwReserverd); ...@@ -983,34 +983,40 @@ System.UInt32 dwReserverd);
System.Text.ASCIIEncoding.ASCII.GetString(encodedDataAsBytes); System.Text.ASCIIEncoding.ASCII.GetString(encodedDataAsBytes);
return returnValue; return returnValue;
} }
public static int Email_Send(string host, int port, string subject, string mailto, string mailbody, string mailfrom, string mailpassword) public static int Email_Send(string subject, string mailtoCollection, string mailbody)
{ {
MailMessage Msg; MailMessage Msg;
int i = 0; int i = 0;
using (Msg = new MailMessage()) using (Msg = new MailMessage())
{ {
// Sender e-mail address. // Sender e-mail address.
Msg.From = new MailAddress(mailfrom); Msg.From = new MailAddress(ConfigurationManager.AppSettings["mailfrom"].ToString().Trim());
// Recipient e-mail address. // Recipient e-mail address.
Msg.To.Add(new MailAddress(mailto)); string[] mailtoCollection1 = mailtoCollection.Split(',');
foreach (string str in mailtoCollection1)
{
Msg.To.Add(new MailAddress(str));
}
//Msg.To.Add((mailcollection));
//Msg.To.Add(new MailAddress(mailto));
//Msg.To.Add(new MailAddress("ajeetkumar.kumar36@gmail.com")); //Msg.To.Add(new MailAddress("ajeetkumar.kumar36@gmail.com"));
Msg.Subject = subject; Msg.Subject = subject;
Msg.Body = mailbody; Msg.Body = mailbody;
Msg.IsBodyHtml = true; Msg.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient(); SmtpClient smtp = new SmtpClient();
smtp.Host = host; smtp.Host = ConfigurationManager.AppSettings["smtp"].ToString().Trim();
smtp.Port = port; smtp.Port = Int32.Parse(ConfigurationManager.AppSettings["port"].ToString().Trim());
//smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; //smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtp.Credentials = new System.Net.NetworkCredential(mailfrom, mailpassword); smtp.Credentials = new System.Net.NetworkCredential(ConfigurationManager.AppSettings["mailfrom"].ToString().Trim(), ConfigurationManager.AppSettings["mailpassword"].ToString().Trim());
//smtp.UseDefaultCredentials = false; //smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true; smtp.EnableSsl = true;
// ServicePointManager.ServerCertificateValidationCallback = // ServicePointManager.ServerCertificateValidationCallback =
//delegate (object s, X509Certificate certificate, //delegate (object s, X509Certificate certificate,
// X509Chain chain, SslPolicyErrors sslPolicyErrors) // X509Chain chain, SslPolicyErrors sslPolicyErrors)
//{ return true; }; //{ return true; };
//smtp.UseDefaultCredentials = true; // smtp.UseDefaultCredentials = false;
try try
{ {
smtp.Send(Msg); smtp.Send(Msg);
...@@ -1029,6 +1035,26 @@ System.UInt32 dwReserverd); ...@@ -1029,6 +1035,26 @@ System.UInt32 dwReserverd);
return i; return i;
} }
} }
public static string getadminemailid(int role)
{
string query = "select UserEmail from tblUserLogin where Role="+role+" and status='1'";
DataLayer obj = DataLayer.Instance;
DataTable dt = obj.SelectDatatable(query);
string email = "";
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
email += dr["UserEmail"].ToString().Trim() + ",";
}
if (email.Length > 0)
{
email = email.Substring(0, email.Length - 1);
}
}
return email;
}
public static string GetWord_Number(string text, int count) public static string GetWord_Number(string text, int count)
{ {
string word = ""; string word = "";
......
...@@ -11,8 +11,8 @@ namespace EnvigoHiring.Models.Login ...@@ -11,8 +11,8 @@ namespace EnvigoHiring.Models.Login
{ {
public class GLogin public class GLogin
{ {
public string clientid = "473716435734-bvubpa7ggdgus63255ku8mqh9buq7eki.apps.googleusercontent.com"; public string clientid = "261213523242-fjma3ocn8aes9dda9grlu15jpmkti799.apps.googleusercontent.com";
public string clientsecret = "30RPoRXZTZVCq6cqs9yWXg8W"; public string clientsecret = "c2btFMstqHWoVi2qi7QgdrpQ";
public string redirection_url = ConfigurationManager.AppSettings["SiteUrl"].ToString().Trim() + "login"; public string redirection_url = ConfigurationManager.AppSettings["SiteUrl"].ToString().Trim() + "login";
public GLogin() public GLogin()
{ {
......
...@@ -40,7 +40,7 @@ namespace EnvigoHiring.Models.Login ...@@ -40,7 +40,7 @@ namespace EnvigoHiring.Models.Login
string status = dt.Rows[0]["status"].ToString().Trim(); string status = dt.Rows[0]["status"].ToString().Trim();
if (status == "0") if (status == "0")
{ {
HttpContext.Current.Response.Redirect("login/thankyou"); HttpContext.Current.Response.Redirect("login/thankyou?email="+Email);
//Take to thank you page //Take to thank you page
} }
else else
...@@ -127,6 +127,7 @@ namespace EnvigoHiring.Models.Login ...@@ -127,6 +127,7 @@ namespace EnvigoHiring.Models.Login
return false; return false;
} }
} }
public void alert(string message, bool success) public void alert(string message, bool success)
{ {
lblMessage = message; lblMessage = message;
......
...@@ -7,6 +7,7 @@ using CommonFunc; ...@@ -7,6 +7,7 @@ using CommonFunc;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Web.Mvc; using System.Web.Mvc;
using System.Configuration;
namespace EnvigoHiring.Models.Position namespace EnvigoHiring.Models.Position
{ {
...@@ -84,13 +85,50 @@ namespace EnvigoHiring.Models.Position ...@@ -84,13 +85,50 @@ namespace EnvigoHiring.Models.Position
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Job Description added successfully."; sv.Message = "<b>Success :</b> Job Description added successfully.";
string email = CommonFunctions.getadminemailid(4);
if (email.Length > 0)
{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
email += "," + dt.Rows[0]["Useremail"].ToString().Trim();
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "JD uploaded for review!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> " + dt.Rows[0]["DesignationName"] + " - JD has been added by " + Users.LoginDetail().UserName.ToString().Trim() + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> to review.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("JD for Position - "+ dt.Rows[0]["DesignationName"] + "", email, StrMail);
}
} }
else if (nstatus == 2) else if (nstatus == 2)
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Job Description updated successfully."; sv.Message = "<b>Success :</b> Job Description updated successfully.";
string email = CommonFunctions.getadminemailid(4);
if (email.Length > 0)
{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
email += "," + dt.Rows[0]["Useremail"].ToString().Trim();
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "JD uploaded for review!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> " + dt.Rows[0]["DesignationName"] + " - JD has been updated by " + Users.LoginDetail().UserName.ToString().Trim() + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> to review.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("JD for Position - " + dt.Rows[0]["DesignationName"] + "", email, StrMail);
}
} }
} }
else else
...@@ -110,6 +148,25 @@ namespace EnvigoHiring.Models.Position ...@@ -110,6 +148,25 @@ namespace EnvigoHiring.Models.Position
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblJobDescription_Approve", perm1); DataTable success1 = obj.ExecuteStoreProcedure("proc_tblJobDescription_Approve", perm1);
if (success1 != null) if (success1 != null)
{ {
string email = CommonFunctions.getadminemailid(4);
if (email.Length > 0)
{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
email += "," + dt.Rows[0]["Useremail"].ToString().Trim();
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "JD uploaded for review!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> " + dt.Rows[0]["DesignationName"] + " - JD has been approved by " + Users.LoginDetail().UserName.ToString().Trim() + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> to review.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("JD for Position - " + dt.Rows[0]["DesignationName"] + "", email, StrMail);
}
//sv.isSuccess = true; //sv.isSuccess = true;
//sv.Message = "<b>Success :</b> Job Description approved successfully."; //sv.Message = "<b>Success :</b> Job Description approved successfully.";
HttpContext.Current.Response.Redirect("/position/viewposition"); HttpContext.Current.Response.Redirect("/position/viewposition");
...@@ -131,6 +188,25 @@ namespace EnvigoHiring.Models.Position ...@@ -131,6 +188,25 @@ namespace EnvigoHiring.Models.Position
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblJobDescription_Approve", perm1); DataTable success1 = obj.ExecuteStoreProcedure("proc_tblJobDescription_Approve", perm1);
if (success1 != null) if (success1 != null)
{ {
string email = CommonFunctions.getadminemailid(4);
if (email.Length > 0)
{
string q = @"SELECT tblUserLogin.UserName,tblUserLogin.Useremail, tblMasterDesignation.DesignationName
FROM tblPositions INNER JOIN tblUserLogin ON tblPositions.RequesterID = tblUserLogin.UserID INNER JOIN
tblMasterDesignation ON tblPositions.DesignationID = tblMasterDesignation.DesignationID
WHERE(tblPositions.PositionID = " + PositionID + ")";
DataTable dt = obj.SelectDatatable(q);
email += "," + dt.Rows[0]["Useremail"].ToString().Trim();
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "JD uploaded for review!");
StrMail = StrMail.Replace("$$Content$$", "Dear Member,<br/><br/> " + dt.Rows[0]["DesignationName"] + " - JD has been rejected by " + Users.LoginDetail().UserName.ToString().Trim() + " in <b>Envigo Hiring</b> application. <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> to review.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("JD for Position - " + dt.Rows[0]["DesignationName"] + "", email, StrMail);
}
//sv.isSuccess = true; //sv.isSuccess = true;
//sv.Message = "<b>Success :</b> Job Description rejected successfully."; //sv.Message = "<b>Success :</b> Job Description rejected successfully.";
HttpContext.Current.Response.Redirect("/position/viewposition"); HttpContext.Current.Response.Redirect("/position/viewposition");
......
...@@ -163,6 +163,24 @@ namespace EnvigoHiring.Models.Position ...@@ -163,6 +163,24 @@ namespace EnvigoHiring.Models.Position
{ {
sv.isSuccess = true; sv.isSuccess = true;
sv.Message = "<b>Success :</b> Page added successfully."; sv.Message = "<b>Success :</b> Page added successfully.";
//Send Mail
string emails = CommonFunctions.getadminemailid(4);
if (emails.Length > 0)
{
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "New Position Posted!");
StrMail = StrMail.Replace("$$Content$$", "Dear Recruiter,<br/><br/> New position has been posted by "+ Users.LoginDetail().UserName.ToString().Trim() + " on <b>Envigo Hiring</b> application, Position TAT date is "+ GetTAT().ToString("MM/dd/yyyy") + ". <a href='" + ConfigurationManager.AppSettings["SiteUrl"] + "' target=_blank>Click here</a> to review.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("New Position Request - Envigo Hiring", emails, StrMail);
}
//End Send Email
return sv; return sv;
} }
else else
...@@ -238,7 +256,11 @@ namespace EnvigoHiring.Models.Position ...@@ -238,7 +256,11 @@ namespace EnvigoHiring.Models.Position
{ {
if (Status == "OnHold") if (Status == "OnHold")
{ {
return Common.FillSelectListManual("OnHold","ReOpen"); return Common.FillSelectListManual("OnHold", "ReOpen");
}
else if (Status == "ReOpen")
{
return Common.FillSelectListManual("Open", "ReOpen", "OnHold");
} }
else else
{ {
......
...@@ -7,6 +7,7 @@ using System.Web.Mvc; ...@@ -7,6 +7,7 @@ using System.Web.Mvc;
using CommonFunc; using CommonFunc;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Configuration;
namespace EnvigoHiring.Models.User namespace EnvigoHiring.Models.User
{ {
...@@ -17,6 +18,7 @@ namespace EnvigoHiring.Models.User ...@@ -17,6 +18,7 @@ namespace EnvigoHiring.Models.User
public string PageHeading { get; set; } public string PageHeading { get; set; }
public string UserName { get; set; } public string UserName { get; set; }
public string Email { get; set; } public string Email { get; set; }
public string EmailID { get; set; }
public bool chkActive { get; set; } public bool chkActive { get; set; }
public int Status { get; set; } public int Status { get; set; }
[Required(ErrorMessage = "Alert! Select Roles")] [Required(ErrorMessage = "Alert! Select Roles")]
...@@ -43,6 +45,7 @@ namespace EnvigoHiring.Models.User ...@@ -43,6 +45,7 @@ namespace EnvigoHiring.Models.User
result = true; result = true;
DataRow row = dt.Rows[0]; DataRow row = dt.Rows[0];
Email = row.SetParamValue("UserEmail"); Email = row.SetParamValue("UserEmail");
EmailID= row.SetParamValue("UserEmail");
UserName = row.SetParamValue("UserName"); UserName = row.SetParamValue("UserName");
ddlRoles = row.SetParamValue("Role"); ddlRoles = row.SetParamValue("Role");
chkActive = (row.SetParamValue("status") == "1") ? true : false; chkActive = (row.SetParamValue("status") == "1") ? true : false;
...@@ -76,6 +79,17 @@ namespace EnvigoHiring.Models.User ...@@ -76,6 +79,17 @@ namespace EnvigoHiring.Models.User
sv.Message = "<b>Error :</b> Please try again later."; sv.Message = "<b>Error :</b> Please try again later.";
} }
alert(sv.Message, sv.isSuccess); alert(sv.Message, sv.isSuccess);
if (Status == 1)
{
string FileName = AppDomain.CurrentDomain.BaseDirectory + "content\\mailer.html";
System.IO.StreamReader ObjStrmRdr;
ObjStrmRdr = System.IO.File.OpenText(FileName);
string StrMail = ObjStrmRdr.ReadToEnd();
StrMail = StrMail.Replace("$$Heading$$", "Account Activated!");
StrMail = StrMail.Replace("$$Content$$", "Your account in <b>Envigo Hiring</b> application has been approved by the admin. <a href='"+ConfigurationManager.AppSettings["SiteUrl"]+"' target=_blank>Click here</a> to login again.");
ObjStrmRdr.Close();
CommonFunctions.Email_Send("Signin Request Approval - Envigo Hiring", EmailID, StrMail);
}
} }
public List<SelectListItem> RolesList() public List<SelectListItem> RolesList()
......
...@@ -91,34 +91,34 @@ ...@@ -91,34 +91,34 @@
<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>
<a>@HttpUtility.HtmlDecode(dr["Education"].ToString().Trim())</a> <a>@HttpUtility.HtmlDecode(dr["Education"].ToString().Trim())</a>
</td> </td>
<th>Experience </th> <th>Experience </th>
<td> <td>
<a>@HttpUtility.HtmlDecode(dr["Experience"].ToString().Trim()) Years</a> <a>@HttpUtility.HtmlDecode(dr["Experience"].ToString().Trim()) Years</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>Working Status </th> <th>Working Status </th>
<td> <td>
<a>@HttpUtility.HtmlDecode(dr["CandidateStatus"].ToString().Trim())</a> <a>@HttpUtility.HtmlDecode(dr["CandidateStatus"].ToString().Trim())</a>
</td> </td>
<th>Interview Status </th> <th>Interview Status </th>
<td> <td>
<a>@HttpUtility.HtmlDecode(dr["Stage"].ToString().Trim())</a> <a>@HttpUtility.HtmlDecode(dr["Stage"].ToString().Trim())</a>
</td> </td>
</tr> </tr>
} }
<tr><td colspan="4"></td></tr> <tr><td colspan="4"></td></tr>
<tr><th colspan="4">Interview Details</th></tr> <tr><th colspan="4">Interview Details</th></tr>
@*Start Loop*@ @*Start Loop*@
@{var interviewStatus = ""; string RoundType = ""; int NewInterview=0; string InterviewType = "";} @{var interviewStatus = ""; string RoundType = ""; int NewInterview = 0; int SuggestedApplicantCount = 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++)
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
RoundType = Convert.ToString(dr["RoundType"]).Trim(); RoundType = Convert.ToString(dr["RoundType"]).Trim();
NewInterview = dr.SetParamValue("NewInterview").ToInt32(); NewInterview = dr.SetParamValue("NewInterview").ToInt32();
InterviewType = dr.SetParamValue("Status"); InterviewType = dr.SetParamValue("Status");
SuggestedApplicantCount = dr.SetParamValue("SuggestedApplicantCount").ToInt32();
//if (RoundType != null && RoundType != "") //if (RoundType != null && RoundType != "")
{ {
<tr> <tr>
...@@ -135,7 +136,7 @@ ...@@ -135,7 +136,7 @@
<th colspan="2"> <th colspan="2">
@HttpUtility.HtmlDecode(dr["RoundType"].ToString().Trim()) @HttpUtility.HtmlDecode(dr["RoundType"].ToString().Trim())
@if (interviewStatus == "1") @if (interviewStatus == "1" && dr.SetParamValue("SheduledOn").ToDateTime() > DateTime.Now)
{ {
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" }))
{ {
...@@ -154,12 +155,38 @@ ...@@ -154,12 +155,38 @@
<th>Assigned To</th> <th>Assigned To</th>
<td>@HttpUtility.HtmlDecode(dr["UserName"].ToString().Trim())</td> <td>@HttpUtility.HtmlDecode(dr["UserName"].ToString().Trim())</td>
</tr> </tr>
<tr>
<th>Interview Status</th>
<td>@HttpUtility.HtmlDecode(dr["InterviewStatus"].ToString().Trim())</td> if (interviewStatus == "1" && dr.SetParamValue("SheduledOn").ToDateTime() < DateTime.Now)
<th>Result</th> {
<td>@HttpUtility.HtmlDecode(dr["Result"].ToString().Trim())</td> using (Html.BeginForm("interviewstatus/" + dr["ApplicantID"].ToString().Trim(), null, FormMethod.Post, new { enctype = "multipart/form-data", id = "formdel", @class = "form-horizontal form-label-left" }))
</tr> {
@Html.AntiForgeryToken()
Model.RoundID = dr["RoundID"].ToString().Trim();
<tr>
<th>Interview Status</th>
<td>@Html.DropDownListFor(m => m.interviewStatus, Model.InterViewStatusList(), new { @class = "form-control", autofocus = "autofocus", required = "required" })</td>
<th></th>
<td></td>
</tr>
<tr>
<td colspan="4" style="text-align:center;">
<button id="btnIntrvwStatus" type="submit" name="btnIntrvwStatus" value="ChangeStatus" style="float:right;" class="btn btn-success">Submit</button>
@Html.HiddenFor(m => m.RoundID)
</td>
</tr>
}
}
else
{
<tr>
<th>Interview Status</th>
<td>@HttpUtility.HtmlDecode(dr["InterviewStatus"].ToString().Trim())</td>
<th>Result</th>
<td>@HttpUtility.HtmlDecode(dr["Result"].ToString().Trim())</td>
</tr>
}
if (Model.RoundsRating != null && Model.RoundsRating.Rows.Count > 0) if (Model.RoundsRating != null && Model.RoundsRating.Rows.Count > 0)
{ {
var filteredDataRows = Model.RoundsRating.Select("RoundID=" + dr["RoundID"].ToString().Trim()); var filteredDataRows = Model.RoundsRating.Select("RoundID=" + dr["RoundID"].ToString().Trim());
...@@ -179,11 +206,13 @@ ...@@ -179,11 +206,13 @@
</tr> </tr>
} }
} }
<tr><td colspan="4"></td></tr> <tr><td colspan="4"></td></tr>
} }
} }
} }
@if (interviewStatus == "6" || interviewStatus == "3" || interviewStatus == "2" || RoundType == null || RoundType == "" || (InterviewType=="ReOpen" && interviewStatus=="4" && NewInterview==0)) @if (interviewStatus == "6" || interviewStatus == "3" || interviewStatus == "2" || RoundType == null || RoundType == "" || (InterviewType == "ReOpen" && interviewStatus == "4" && NewInterview == 0 && SuggestedApplicantCount > 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" }))
...@@ -215,8 +244,9 @@ ...@@ -215,8 +244,9 @@
<tr> <tr>
<th colspan="2">Next Round</th> <th colspan="2">Next Round</th>
<td colspan="2"> <td colspan="2">
@Html.DropDownListFor(m => m.RoundType, new SelectList(new List<Object>{new { value = "Telephonic" , text = "Telephonic" }, @Html.DropDownListFor(m => m.RoundType, new SelectList(new List<Object>
new { value = "F2F" , text = "F2F" }}, "value", "text"), new { @class = "form-control", autofocus = "autofocus" }) {new { value = "Telephonic" , text = "Telephonic" },
new { value = "F2F" , text = "F2F" }}, "value", "text"), new { @class = "form-control", autofocus = "autofocus" })
</td> </td>
</tr> </tr>
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu"> <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
<div class="menu_section"> <div class="menu_section">
<h3>@Users.LoginDetail().Roles</h3> <h3>@Users.LoginDetail().Roles</h3>
@{Html.RenderAction("leftmenu", "leftpanel");} @{Html.RenderAction("leftmenu", "leftpanel");}
</div> </div>
</div> </div>
...@@ -92,7 +93,7 @@ ...@@ -92,7 +93,7 @@
<span class="fa fa-angle-down"></span> <span class="fa fa-angle-down"></span>
</a> </a>
<ul class="dropdown-menu dropdown-usermenu pull-right"> <ul class="dropdown-menu dropdown-usermenu pull-right">
<li><a href="login.html"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li> <li><a href="/login/logout"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
......
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@ViewBag.Title</title>
<title>Envigo | </title>
<!-- Bootstrap -->
<link href="/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- NProgress -->
<link href="/vendors/nprogress/nprogress.css" rel="stylesheet">
<!-- Custom Theme Style -->
@RenderSection("head", required: false)
<!-- CSS -->
<link href="/vendors/build/css/custom.min.css" rel="stylesheet">
</head>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<div class="col-md-3 left_col">
<div class="left_col scroll-view">
<div class="navbar nav_title" style="border: 0;">
<a href="/dashboard" class="site_title"><i class="fa fa-paw"></i> <span>Envigo</span></a>
</div>
<div class="clearfix"></div>
<!-- menu profile quick info -->
<div class="profile clearfix">
<div class="profile_pic">
@{if (Users.LoginDetail().pic == null || Users.LoginDetail().pic == "")
{
<img src="~/images/img.jpg" alt="" class="img-circle profile_img" />
}
else
{
<img src="@Users.LoginDetail().pic" alt="" class="img-circle profile_img" />
}
}
</div>
<div class="profile_info">
<span>Welcome,</span>
<h2>@Users.LoginDetail().UserName</h2>
</div>
<div class="clearfix"></div>
</div>
<!-- /menu profile quick info -->
<br />
<!-- sidebar menu -->
<div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
<div class="menu_section">
<h3>@Users.LoginDetail().Roles</h3>
@{Html.RenderAction("leftmenu", "leftpanel");}
</div>
</div>
<!-- /sidebar menu -->
</div>
</div>
<!-- top navigation -->
<div class="top_nav">
<div class="nav_menu">
<nav>
<div class="nav toggle">
<a id="menu_toggle"><i class="fa fa-bars"></i></a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="">
<a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
@{if (Users.LoginDetail().pic == null || Users.LoginDetail().pic == "")
{
<img src="~/images/img.jpg" alt="" />
}
else
{
<img src="@Users.LoginDetail().pic" alt="" />
}
}@Users.LoginDetail().UserName
<span class="fa fa-angle-down"></span>
</a>
<ul class="dropdown-menu dropdown-usermenu pull-right">
<li><a href="/login/logout"><i class="fa fa-sign-out pull-right"></i> Log Out</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
<!-- /top navigation -->
<!-- page content -->
<div class="right_col" role="main">
@RenderBody()
</div>
<!-- /page content -->
<!-- footer content -->
<footer>
<div class="pull-right">
Envigo
</div>
<div class="clearfix"></div>
</footer>
<!-- /footer content -->
</div>
</div>
<!-- Javascript Libraries -->
<!-- jQuery -->
<script src="/vendors/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="/vendors/bootstrap/dist/js/bootstrap.js"></script>
<!-- FastClick -->
<script src="/vendors/fastclick/lib/fastclick.js"></script>
<!-- NProgress -->
<script src="/vendors/nprogress/nprogress.js"></script>
<script src="/vendors/custom.js"></script>
@RenderSection("script", required: false)
<!-- Custom Theme Scripts -->
<script src="/vendors/build/js/custom.js"></script>
</body>
</html>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@if (role == "Admin" || role == "Recruiter") @if (role == "Admin" || role == "Recruiter")
{ {
<li> <li>
<a><i class="fa fa-edit"></i> Candidate Pool <span class="fa fa-chevron-down"></span></a> <a><i class="fa fa-database"></i> Candidate Pool <span class="fa fa-database"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
<li><a href="/candidate/viewcandidate">View Candidate</a></li> <li><a href="/candidate/viewcandidate">View Candidate</a></li>
<li><a href="/candidate/addcandidate">Add Candidate</a></li> <li><a href="/candidate/addcandidate">Add Candidate</a></li>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@if (role == "Admin" || role == "Recruiter" || role == "HR") @if (role == "Admin" || role == "Recruiter" || role == "HR")
{ {
<li> <li>
<a><i class="fa fa-table"></i> Applicants <span class="fa fa-chevron-down"></span></a> <a><i class="fa fa-crosshairs"></i> Applicants <span class="fa fa-crosshairs"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
@*<li><a href="tables.html">Review applicants</a></li>*@ @*<li><a href="tables.html">Review applicants</a></li>*@
<li><a href="/applicants">applicants for interview</a></li> <li><a href="/applicants">applicants for interview</a></li>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
@if (role == "Admin" || role == "Recruiter" || role == "User") @if (role == "Admin" || role == "Recruiter" || role == "User")
{ {
<li> <li>
<a><i class="fa fa-desktop"></i> Positions <span class="fa fa-chevron-down"></span></a> <a><i class="fa fa-bookmark-o"></i> Positions <span class="fa fa-bookmark-o"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
<li><a href="/position/viewposition">View Open Positions</a></li> <li><a href="/position/viewposition">View Open Positions</a></li>
<li><a href="/position/view-inactive-position">View Closed/OnHold Positions</a></li> <li><a href="/position/view-inactive-position">View Closed/OnHold Positions</a></li>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
@if (role == "Admin") @if (role == "Admin")
{ {
<li> <li>
<a><i class="fa fa-bar-chart-o"></i> Users <span class="fa fa-chevron-down"></span></a> <a><i class="fa fa-users"></i> Users <span class="fa fa-users"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
<li><a href="/user/activeusers">View Users</a></li> <li><a href="/user/activeusers">View Users</a></li>
<li><a href="/user/pendingusers">Pending Users</a></li> <li><a href="/user/pendingusers">Pending Users</a></li>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</li> </li>
<li> <li>
<a><i class="fa fa-bar-chart-o"></i> Settings <span class="fa fa-chevron-down"></span></a> <a><i class="fa fa-cog"></i> Settings <span class="fa fa-settings"></span></a>
<ul class="nav child_menu"> <ul class="nav child_menu">
<li><a href="/department">View Departments</a></li> <li><a href="/department">View Departments</a></li>
<li><a href="/department/add">Add Department</a></li> <li><a href="/department/add">Add Department</a></li>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{ {
string applicantid = applicantList[i].ApplicantID.ToString().Trim(); string applicantid = applicantList[i].ApplicantID.ToString().Trim();
string positionID = applicantList[i].positionID.ToString().Trim(); 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(); var applicant = (from System.Data.DataRow cat in Model.dtApplicant.Rows where cat["ApplicantID"].ToString() == applicantid orderby cat["RoundID"] descending select cat).Take(2).ToList();
string candidateID = applicant[0]["CandidateID"].ToString().Trim(); string candidateID = applicant[0]["CandidateID"].ToString().Trim();
string positionStatus = applicant[0]["Status"].ToString().Trim(); string positionStatus = applicant[0]["Status"].ToString().Trim();
if (applicant != null) if (applicant != null)
...@@ -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 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="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</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]["DesignationName"].ToString().Trim().HtmlDecode()<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>
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
string ScheduleDate = applicant[k]["SheduledOn"].ToString().Trim(); string ScheduleDate = applicant[k]["SheduledOn"].ToString().Trim();
ScheduleDate = (ScheduleDate == "") ? "" : ScheduleDate.ToDateTime().ToString("dd MMM yyyy hh:mm tt"); ScheduleDate = (ScheduleDate == "") ? "" : ScheduleDate.ToDateTime().ToString("dd MMM yyyy hh:mm tt");
string InterViewResult = applicant[k]["InterViewResult"].ToString().Trim(); string InterViewResult = applicant[k]["InterViewResult"].ToString().Trim();
InterViewResult = (InterViewResult == "") ? positionStatus : InterViewResult; 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 />
...@@ -93,13 +94,25 @@ ...@@ -93,13 +94,25 @@
} }
<td> <td>
Add Comment<br />
@if (positionStatus == "Open") @if ((positionStatus == "Open" || positionStatus == "ReOpen") && applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() > 0)
{ {
<a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br /> <a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br />
<span>Add Comment</span><br />
}
@if (applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() == 0)
{
<button title='Activate Applicant' class="btn btn-success btn-xs" name="btnActivate" style='cursor:pointer;' value="Activate_@applicantid">
Activate
</button>
}
@if (positionStatus == "OnHold")
{
@positionStatus<br />
} }
@positionStatus<br />
</td> </td>
</tr> </tr>
} }
} }
......
...@@ -15,6 +15,34 @@ ...@@ -15,6 +15,34 @@
<h2>Applicant Details</h2> <h2>Applicant Details</h2>
} }
<div class="x_content"> <div class="x_content">
@if (Model.lblMessage != null && Model.lblMessage != "")
{
<div class="alert alert-@Model.MessageType alert-dismissible fade in" data-valmsg-summary="true" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<ul>
@if (Html.ViewData.ModelState.IsValid)
{
@Html.ValidationSummary(false)
}
@Html.Raw(Model.lblMessage)
</ul>
</div>
}
else
{
<div class="alert alert-danger alert-dismissible fade in" data-valmsg-summary="true" role="alert" 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) @if (Model.dtApplicant != null && Model.dtApplicant.Rows.Count > 0)
{ {
var row = Model.dtApplicant.Rows[0]; var row = Model.dtApplicant.Rows[0];
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
@Html.TextBoxFor(m => m.BuyOutCost, new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" }) @Html.TextBoxFor(m => m.BuyOutCost, new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
</div> </div>
</div> </div>
if (Model.CandidateID > 0) if (Model.ApplicantID > 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="ContactNo"> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="ContactNo">
......
...@@ -151,13 +151,13 @@ ...@@ -151,13 +151,13 @@
<td> <td>
@if ((positionStatus == "Open" || positionStatus == "ReOpen") && applicant[0].SetParamValue("NewInterview").ToInt32() == 0) @if ((positionStatus == "Open" || positionStatus == "ReOpen") && applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() > 0)
{ {
<a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br /> <a href="/applicants/edit/@positionID/@candidateID"> Edit details</a><br />
<span>Add Comment</span><br /> <span>Add Comment</span><br />
} }
@if (applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() == 0) @if (positionStatus == "ReOpen" && applicant[0].SetParamValue("NewInterview").ToInt32() == 0 && applicant[0].SetParamValue("SuggestedApplicantCount").ToInt32() == 0)
{ {
<button title='Activate Applicant' class="btn btn-success btn-xs" name="btnActivate" style='cursor:pointer;' value="Activate_@applicantid"> <button title='Activate Applicant' class="btn btn-success btn-xs" name="btnActivate" style='cursor:pointer;' value="Activate_@applicantid">
Activate Activate
......
...@@ -56,20 +56,54 @@ ...@@ -56,20 +56,54 @@
<label class="control-label col-md-3 col-sm-3 col-xs-12" style="padding-top:0px;" for="DesignationName"> <label class="control-label col-md-3 col-sm-3 col-xs-12" style="padding-top:0px;" for="DesignationName">
Designation : Designation :
</label> </label>
<div class="col-md-6 col-sm-6 col-xs-12"> <div class="col-md-4 col-sm-4 col-xs-12">
@Html.DisplayFor(m => m.Designation, new { @class = "form-control col-md-7 col-xs-12" }) @Html.DisplayFor(m => m.Designation, new { @class = "form-control col-md-7 col-xs-12" })
</div> </div>
<div class="col-md-5 col-sm-5 col-xs-12">
<label class="control-label col-md-5 col-sm-5 col-xs-12" style="padding-top:0px;" for="DesignationName">
Candidate Type:
</label>
<div class="col-md-7 col-sm-7 col-xs-12">
@*@Html.DropDownListFor(m => m.ddlSelectedCandidate,Model.CandidateTypeList(), new { @class = "form-control col-md-7 col-xs-12", onchange = "mySearchDropdownFunction('ddlSelectedCandidate', '0')" })*@
<select class="form-control col-md-7 col-xs-12" id="ddlSelectedCandidate" name="ddlSelectedCandidate" onchange="mySearchDropdownFunction('ddlSelectedCandidate', '0')">
<option value="">All</option>
<option value="Participated">Participated</option>
<option value="Selected">Selected</option>
<option value="Approve">Approved</option>
<option value="Reject">Rejected</option>
</select>
</div>
</div>
</div> </div>
<div class="item form-group"> <div class="item form-group">
<label class="col-md-3 col-sm-3 col-xs-12" for="Department"> <label class="col-md-3 col-sm-3 col-xs-12" for="Department">
Select candidate <span class="required">*</span> Select candidate: <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.ListBoxFor(m => m.CandidateList,Model.CanidateList(), new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" }) @Html.ListBoxFor(m => m.CandidateList,Model.CanidateList(), new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
</div>*@ </div>*@
</div> </div>
<div class="ln_solid"></div>
<div class="item form-group"> <div class="item form-group">
<div class="col-md-12 col-sm-12 col-xs-12"> <div class="col-md-12 col-sm-12 col-xs-12">
<div class="col-md-12 col-sm-12 col-xs-12">
<nav class="navbar navbar-default">
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="Education" name="Education" onkeyup="mySearchFunction('Education', '3')" placeholder="Education" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="ddlDepartment" name="ddlDepartment" onkeyup="mySearchFunction('ddlDepartment', '4')" placeholder="Department" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="SExperience" name="SExperience" onkeyup="mySearchFunction('SExperience', '5')" placeholder="Experience" type="text" value="">
</div>
<div class="col-xs-3" style="padding: 7px 10px 7px 10px;">
<input class="form-control" id="ddlCandidateStatus" name="ddlCandidateStatus" onkeyup="mySearchFunction('ddlCandidateStatus', '6')" placeholder="CandidateStatus" type="text" value="">
</div>
</nav>
</div>
<table id="datatable" class="table table-striped table-bordered"> <table id="datatable" class="table table-striped table-bordered">
<thead> <thead>
<tr> <tr>
...@@ -139,6 +173,7 @@ ...@@ -139,6 +173,7 @@
<button title='Recycle' style='cursor:pointer;padding:0px;margin-bottom:-3px' name="btnReject" class="btn btn-link" value="Reject_@ID"><i class="fa fa-recycle"></i> </button> <button title='Recycle' style='cursor:pointer;padding:0px;margin-bottom:-3px' name="btnReject" class="btn btn-link" value="Reject_@ID"><i class="fa fa-recycle"></i> </button>
} }
} }
<input type="hidden" class="hdnCType" name="hdnCType" value="@cstatus" />
</td> </td>
<td>@Html.Raw(HttpUtility.HtmlDecode(candidate[0]["Name"].ToString().Trim()))</td> <td>@Html.Raw(HttpUtility.HtmlDecode(candidate[0]["Name"].ToString().Trim()))</td>
<td>@Html.Raw(HttpUtility.HtmlDecode(candidate[0]["EmailID"].ToString().Trim()))</td> <td>@Html.Raw(HttpUtility.HtmlDecode(candidate[0]["EmailID"].ToString().Trim()))</td>
......
 
@{ @{
ViewBag.Title = "Index"; ViewBag.Title = "Dashboard";
Layout = "~/Views/Shared/_Layout.cshtml"; Layout = "~/Views/Shared/_Layoutdashboard.cshtml";
} }
<h2>Index</h2> <h2>Dashboard</h2>
@Users.LoginDetail().UserEmail <br /> @*@Users.LoginDetail().UserEmail <br />
@Users.LoginDetail().UserName <br /> @Users.LoginDetail().UserName <br />
@Users.LoginDetail().UserID <br /> @Users.LoginDetail().UserID <br />
@Users.LoginDetail().Roles <br /> @Users.LoginDetail().Roles <br />*@
<div class="">
<div class="row top_tiles">
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><i class="fa fa-users"></i></div>
<div class="count">179</div>
<h3>Users</h3>
<p></p>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><i class="fa fa-database"></i></div>
<div class="count">179</div>
<h3>Sourcing</h3>
<p></p>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><i class="fa fa-bookmark-o"></i></div>
<div class="count">179</div>
<h3>Positions</h3>
<p></p>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<div class="icon"><i class="fa fa-crosshairs"></i></div>
<div class="count">179</div>
<h3>Applicants</h3>
<p></p>
</div>
</div>
</div>
<div class="row top_tiles">
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<table class="table">
<tbody>
<tr><td>Today</td><td>1</td></tr>
<tr><td>This Week</td><td>1</td></tr>
<tr><td>This Month</td><td>1</td></tr>
</tbody>
</table>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<table class="table">
<tbody>
<tr><td>Today</td><td>1</td></tr>
<tr><td>This Week</td><td>1</td></tr>
<tr><td>This Month</td><td>1</td></tr>
</tbody>
</table>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<table class="table">
<tbody>
<tr><td>Today</td><td>1</td></tr>
<tr><td>This Week</td><td>1</td></tr>
<tr><td>This Month</td><td>1</td></tr>
</tbody>
</table>
</div>
</div>
<div class="animated flipInY col-lg-3 col-md-3 col-sm-6 col-xs-12">
<div class="tile-stats">
<table class="table">
<tbody>
<tr><td>Today</td><td>1</td></tr>
<tr><td>This Week</td><td>1</td></tr>
<tr><td>This Month</td><td>1</td></tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="row top_tiles">
<div class="animated flipInY col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="tile-stats">
<table class="table">
<thead>
<tr>
<th colspan="1" style="text-align:center">Positions</th>
<th colspan="3" style="text-align:center">Count</th>
</tr>
<tr>
<th>Designation</th>
<th>Open</th>
<th>Closed</th>
<th>On Hold</th>
</tr>
</thead>
<tbody>
<tr><td>Account Director</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>BD Manager</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>PPC Head</td><td>1</td><td>1</td><td>1</td></tr>
</tbody>
</table>
</div>
</div>
<div class="animated flipInY col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="tile-stats">
<table class="table">
<thead>
<tr>
<th colspan="1" style="text-align:center">Interview Scheduled</th>
<th colspan="3" style="text-align:center">Count</th>
</tr>
<tr>
<th>User</th>
<th>Today</th>
<th>This Week</th>
<th>This Month</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr><td>Vivek</td><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>Ajeet</td><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>Rahul</td><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>Rahul</td><td>1</td><td>1</td><td>1</td><td>1</td></tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<section class="login_content"> <section class="login_content">
<form> <form>
<h1>Success!</h1> <h1>Success!</h1>
<p>Thank you for sign up. We will update you ones your acount will be activated by Admin.</p> <p>Thank you for sign up. We will update you once your acount will be activated by Admin.</p>
<div class="separator"> <div class="separator">
<div class="clearfix"></div> <div class="clearfix"></div>
<br /> <br />
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<td> <td>
@if (row.SetParamValue("status").ToLower() == "open" || row.SetParamValue("status").ToLower() == "reopen") @if (row.SetParamValue("status").ToLower() == "open" || row.SetParamValue("status").ToLower() == "reopen")
{ {
if (role == "Admin" || role == "User") if (role == "Admin" || role == "User" || role == "Recruiter")
{ {
<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>
} }
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
User Name <span class="required">*</span> User Name <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.DisplayFor(m => m.UserName, new { @class = "form-control col-md-7 col-xs-12" }) @Html.TextBoxFor(m => m.UserName, new { @class = "form-control col-md-7 col-xs-12", @readonly = "readonly", disabled = "disabled" })
</div> </div>
</div> </div>
<div class="item form-group"> <div class="item form-group">
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
Email <span class="required">*</span> Email <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.DisplayFor(m => m.Email, new { @class = "form-control col-md-7 col-xs-12" }) @Html.TextBoxFor(m => m.Email, new { @class = "form-control col-md-7 col-xs-12", @readonly="readonly", disabled= "disabled" })
@Html.HiddenFor(m=>m.EmailID)
</div> </div>
</div> </div>
<div class="item form-group"> <div class="item form-group">
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
<add key="UnobtrusiveJavaScriptEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="SecurityKey" value="dslkghsdfjgsdjjhsd45sflj92384o32sdfkjfasdjf9832jsdlkesr3244wfdsa" /> <add key="SecurityKey" value="dslkghsdfjgsdjjhsd45sflj92384o32sdfkjfasdjf9832jsdlkesr3244wfdsa" />
<add key="ResumePath" value="/Upload/Resume"/> <add key="ResumePath" value="/Upload/Resume"/>
<add key="smtp" value="smtp.gmail.com"></add>
<add key="mailfrom" value="vivek@envigo.co.uk"></add>
<add key="mailpassword" value="trsygbahtenpxvmm"></add>
</appSettings> </appSettings>
<connectionStrings> <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=DESKTOP-5KQ0L4H\MSSQLSERVER2012; Initial Catalog=DBEnvigoHr; uid=sa; pwd=sa123;MultipleActiveResultSets=True; Max Pool Size=200;" providerName="System.Data.SqlClient" /> <add name="ConnectionString" connectionString="Data Source=DESKTOP-5KQ0L4H\MSSQLSERVER2012; Initial Catalog=DBEnvigoHr; uid=sa; pwd=sa123;MultipleActiveResultSets=True; Max Pool Size=200;" providerName="System.Data.SqlClient" />
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
<add key="UnobtrusiveJavaScriptEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="SecurityKey" value="dslkghsdfjgsdjjhsd45sflj92384o32sdfkjfasdjf9832jsdlkesr3244wfdsa" /> <add key="SecurityKey" value="dslkghsdfjgsdjjhsd45sflj92384o32sdfkjfasdjf9832jsdlkesr3244wfdsa" />
<add key="ResumePath" value="/Upload/Resume"/> <add key="ResumePath" value="/Upload/Resume"/>
<add key="smtp" value="smtp.gmail.com"></add>
<add key="mailfrom" value="vivek@envigo.co.uk"></add>
<add key="mailpassword" value="trsygbahtenpxvmm"></add>
</appSettings> </appSettings>
<connectionStrings> <connectionStrings>
<add name="ConnectionString" connectionString="Data Source=DESKTOP-5KQ0L4H\MSSQLSERVER2012; Initial Catalog=DBEnvigoHr; uid=sa; pwd=sa123;MultipleActiveResultSets=True; Max Pool Size=200;" providerName="System.Data.SqlClient" /> <add name="ConnectionString" connectionString="Data Source=DESKTOP-5KQ0L4H\MSSQLSERVER2012; Initial Catalog=DBEnvigoHr; uid=sa; pwd=sa123;MultipleActiveResultSets=True; Max Pool Size=200;" providerName="System.Data.SqlClient" />
......
...@@ -62,6 +62,41 @@ function mySearchFunction(id, postion) { ...@@ -62,6 +62,41 @@ function mySearchFunction(id, postion) {
} }
} }
function mySearchDropdownFunction(id, postion) {
// Declare variables
var input, filter, table, tr, td, i;
input = document.getElementById(id);
filter = input.value.toUpperCase();
filter = (filter == "ALL") ? "" : filter;
tr = $("#datatable").find("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 1; i < tr.length; i++) {
td = $(tr[i]).find("td")[postion];
var value = "";
if (td != undefined)
{
value = $(td).find(".hdnCType").val();
}
if (filter == "Participated".toUpperCase()) {
value = (value == "Approve" || value == "Reject" || value == "Selected") ? "Participated" : value;
}
value = value.toUpperCase();
if (filter != "") {
value = (value == "") ? "Select" : value;
}
if (value!=undefined) {
if (value.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
function mergeQueryString(newquerystring) { function mergeQueryString(newquerystring) {
var NQSArray = newquerystring.split('&'); var NQSArray = newquerystring.split('&');
var url = window.location.href; var url = window.location.href;
......
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