Commit 885c4edc by Ajeet Kumar

02-09-2019

parent c514a36d
......@@ -79,11 +79,25 @@ namespace EnvigoHiring.Controllers
}
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult delete(int ID, Display applicant)
public ActionResult delete(int ID, Display applicant, string btndelete)
{
if (btndelete == "Delete")
{
applicant.ApplicantID = ID;
applicant.deleteround();
return RedirectToAction("index/" + ID.ToString(), "AppicantDisplayAll");
}
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 EnvigoHiring.Models.Login;
using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
namespace EnvigoHiring.Controllers
{
......@@ -8,7 +11,6 @@ namespace EnvigoHiring.Controllers
{
// GET: login
public ActionResult Index(string code,string ReturnUrl)
{
LoginModel lm = new LoginModel();
//lm.IsAntiForgery = false;
......@@ -39,7 +41,33 @@ namespace EnvigoHiring.Controllers
}
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();
}
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
Interviewdate = row.SetParamValue("SheduledOn").ToDateTime().ToString("MM/dd/yyyy hh:mm");
Interviewer = row.SetParamValue("Interviewer");
ddlInterviewStage = row.SetParamValue("Stage");
ApplicantID= row.SetParamValue("ApplicantID").ToInt32();
if (ddlInterviewRound!="")
{
HideInterview = true;
......@@ -171,17 +172,18 @@ namespace EnvigoHiring.Models.Applicants
{
FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim();
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.*,
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)
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);
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
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 tblMasterInterviewStatus intstatus on (t1.InterviewStatus=intstatus.InterviewStatusID) {0} order by t1.SheduledOn desc, t1.RoundType desc", Subquery);
return obj.SelectDatatable(query);
}
public DataTable DisplayApplicantsByPosition(int id = 0)
{
FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim();
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
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)
......
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using CommonFunc;
using System.Web.Mvc;
using System.Data.SqlClient;
using System.Configuration;
using System.ComponentModel.DataAnnotations;
namespace EnvigoHiring.Models.Applicants
{
public class ApplicantsDetail : BaseClass
{
public int CandidateID { get; set; }
public int PositionID { get; set; }
public int ApplicantID { get; set; }
public string Applicant { get; set; }
public string Position { get; set; }
public string Email { get; set; }
public string ContactNo { get; set; }
[Required(ErrorMessage ="Alert! Notice period should not be empty")]
public int NoticePeriod { get; set; }
[Required(ErrorMessage = "Alert! Current Salary should not be empty")]
public double CurrentSalary { get; set; }
public double ExpectedSalary { get; set; }
public double Hikepercentage { get; set; }
public string LastAppraised { get; set; }
public string ddlBuyOut { get; set; }
public double BuyOutCost { get; set; }
public string ddlInterviewRound { get; set; }
public string Interviewdate { get; set; }
public string Interviewer { get; set; }
public string ddlInterviewStage { get; set; }
public bool HideInterview { get; set; }
public DataTable dtApplicant { get; set; }
DataLayer obj = DataLayer.Instance;
public bool FillData()
{
bool result = false;
HideInterview = false;
string query = string.Format(@"Select cand.Name,pos.RequesterID,pos.DesignationName,cand.EmailID,cand.Phone,apl.*,round.RoundType,round.Interviewer
,round.SheduledOn,apl.Stage from tblSuggestedApplicants sa left outer join tblApplicants apl on (sa.Candidate=apl.CandidateID)
left outer join tblInterviewRounds round on (apl.ApplicantID=round.ApplicantID)
inner join vwPosition pos on (sa.PositionID=pos.PositionID) inner join tblMasterCandidatePool cand on
(sa.Candidate=cand.CandidateID) where sa.CurrentStatus='Approve' and sa.Candidate={0} and sa.PositionID={1} order by round.roundtype desc", CandidateID, PositionID);
DataTable dt = obj.SelectDatatable(query);
if (dt != null && dt.Rows.Count > 0)
{
result = true;
DataRow row = dt.Rows[0];
Applicant = row.SetParamValue("Name");
Position = row.SetParamValue("DesignationName");
Email = row.SetParamValue("EmailID");
ContactNo = row.SetParamValue("Phone");
NoticePeriod = row.SetParamValue("NoticePeriodDays").ToInt32();
CurrentSalary = row.SetParamValue("CurrentSalary").ToDouble();
ExpectedSalary = row.SetParamValue("ExpectedSalary").ToDouble();
Hikepercentage = row.SetParamValue("RaisePercentage").ToDouble();
LastAppraised = row.SetParamValue("Last_Appraised_On");
ddlBuyOut = row.SetParamValue("IsBuyout");
BuyOutCost = row.SetParamValue("BuyoutCost").ToDouble();
ddlInterviewRound = row.SetParamValue("Stage");
Interviewdate = row.SetParamValue("SheduledOn").ToDateTime().ToString("MM/dd/yyyy hh:mm");
Interviewer = row.SetParamValue("Interviewer");
ApplicantID= row.SetParamValue("ApplicantID").ToInt32();
ddlInterviewStage = row.SetParamValue("Stage");
if (ddlInterviewRound!="")
{
HideInterview = true;
}
}
return result;
}
public void SaveData()
{
var sv = Save();
alert(sv.Message, sv.isSuccess);
}
public validate ValidateData()
{
validate vm = new validate();
vm = ValidationFunc.ValidateModelData<ApplicantsDetail>(this, "NoticePeriod", "CurrentSalary", "ExpectedSalary",
"Hikepercentage", "LastAppraised", "ddlBuyOut", "BuyOutCost", "ddlInterviewRound", "Interviewdate", "Interviewer");
if (HideInterview==false && !CommonFunctions.IsDate(Interviewdate))
{
vm.isValid = false;
vm.Message = "Alert! Interview date is datetime type";
}
if (ExpectedSalary == 0 && Hikepercentage == 0)
{
vm.isValid = false;
vm.Message = "Alert! Fill either excpected salary or hike percentage";
}
return vm;
}
public SaveData Save()
{
SaveData sv = new SaveData();
var vl = ValidateData();
sv.isSuccess = vl.isValid;
if (vl.isValid == false)
{
sv.Message = vl.Message;
return sv;
}
if (ExpectedSalary > 0)
{
Hikepercentage = (ExpectedSalary * 100 / CurrentSalary)-100;
}
else
{
ExpectedSalary = CurrentSalary * (100 + Hikepercentage) / 100;
}
ddlInterviewStage = (ddlInterviewStage.ToInt32() == 0) ? "1" : ddlInterviewStage;
SqlParameter[] perm1 = new SqlParameter[14];
perm1[0] = new SqlParameter("@CandidateID", CandidateID);
perm1[1] = new SqlParameter("@PositionID", PositionID);
perm1[2] = new SqlParameter("@NoticePeriodDays", NoticePeriod);
perm1[3] = new SqlParameter("@UserID", UserID);
perm1[4] = new SqlParameter("@CurrentSalary", CurrentSalary);
perm1[5] = new SqlParameter("@ExpectedSalary", ExpectedSalary);
perm1[6] = new SqlParameter("@RaisePercentage", Hikepercentage);
perm1[7] = new SqlParameter("@Last_Appraised_On", LastAppraised);
perm1[8] = new SqlParameter("@IsBuyout", ddlBuyOut);
perm1[9] = new SqlParameter("@BuyoutCost", BuyOutCost);
perm1[10] = new SqlParameter("@interviewType", ddlInterviewRound);
perm1[11] = new SqlParameter("@interviewer", Interviewer);
perm1[12] = new SqlParameter("@interviewdate", Interviewdate.ToDateTime());
perm1[13] = new SqlParameter("@Stage", ddlInterviewStage.ToInt32());
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblApplicants", perm1);
//CandidateID = Int32.Parse(perm1[19].Value.ToString().Trim());'@LastCompany',
if (success1 != null)
{
sv.isSuccess = true;
sv.Message = "<b>Success :</b> Applicant updated successfully.";
}
else
{
sv.isSuccess = false;
sv.Message = "<b>Error :</b> Please try again later.";
}
alert(sv.Message, sv.isSuccess);
return sv;
}
public List<SelectListItem> InterviewerList()
{
string Query = "Select UserName, UserID from tblUserLogin where Role in (1,3) and status=1";
return Common.FillSelectList(Query, "UserName", "UserID");
}
public List<SelectListItem> BuyOutList()
{
return Common.FillSelectListManual("Yes", "No", "Not Sure");
}
public List<SelectListItem> InterviewType()
{
return Common.FillSelectListManual("Telephonic", "F2F");
}
public List<SelectListItem> IntervieweStageList()
{
string Query = "Select StatusName, HiringID from tblMasterHiringStatus order by HiringID";
return Common.FillSelectList(Query, "StatusName", "HiringID");
}
public DataTable DisplayApplicants(int id=0)
{
FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim();
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.*,
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)
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);
return obj.SelectDatatable(query);
}
public DataTable DisplayApplicantsByPosition(int id = 0)
{
FilePath = ConfigurationManager.AppSettings["ResumePath"].ToString().Trim();
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,
(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)
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);
}
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
......@@ -12,7 +12,7 @@ namespace EnvigoHiring.Models.Applicants
public DataTable ApplicantData { get; set; }
public DataTable ApplicantRounds { get; set; }
public DataTable RoundsRating { get; set; }
public string interviewStatus { get; set; }
public string MessageType { get; set; }
public string lblMessage { get; set; }
public List<SelectListItem> UserList { get; set; }
......@@ -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,
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.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
......@@ -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
}
public void SaveData()
{
if (ddlInterViewStatus.ToInt32() == 1)
{
alert("Alert! Change interview status", false);
return;
}
SqlParameter[] perm1 = new SqlParameter[16];
perm1[0] = new SqlParameter("@RoundID", RoundID.ToInt32());
perm1[1] = new SqlParameter("@ApplicantID", ApplicantdID.ToInt32());
......@@ -89,7 +94,7 @@ namespace EnvigoHiring.Models.Applicants
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");
}
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
/* Upload Banner Image */
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");
if (!vm.isValid)
{
......@@ -216,13 +216,11 @@ namespace EnvigoHiring.Models.CandidatePool
{
sv.isSuccess = true;
sv.Message = "<b>Success :</b> Page added successfully.";
}
else
{
sv.isSuccess = true;
sv.Message = "<b>Success :</b> Page updated successfully.";
}
}
else
......
......@@ -78,7 +78,26 @@ namespace EnvigoHiring.Models.CandidateSelection
if (success1 != null)
{
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
{
......@@ -99,7 +118,27 @@ namespace EnvigoHiring.Models.CandidateSelection
if (success1 != null)
{
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
{
......
......@@ -90,6 +90,28 @@ namespace EnvigoHiring.Models.CandidateSelection
{
sv.isSuccess = true;
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
{
......
......@@ -983,26 +983,32 @@ System.UInt32 dwReserverd);
System.Text.ASCIIEncoding.ASCII.GetString(encodedDataAsBytes);
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;
int i = 0;
using (Msg = new MailMessage())
{
// Sender e-mail address.
Msg.From = new MailAddress(mailfrom);
Msg.From = new MailAddress(ConfigurationManager.AppSettings["mailfrom"].ToString().Trim());
// 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.Subject = subject;
Msg.Body = mailbody;
Msg.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = host;
smtp.Port = port;
smtp.Host = ConfigurationManager.AppSettings["smtp"].ToString().Trim();
smtp.Port = Int32.Parse(ConfigurationManager.AppSettings["port"].ToString().Trim());
//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.EnableSsl = true;
......@@ -1010,7 +1016,7 @@ System.UInt32 dwReserverd);
//delegate (object s, X509Certificate certificate,
// X509Chain chain, SslPolicyErrors sslPolicyErrors)
//{ return true; };
//smtp.UseDefaultCredentials = true;
// smtp.UseDefaultCredentials = false;
try
{
smtp.Send(Msg);
......@@ -1029,6 +1035,26 @@ System.UInt32 dwReserverd);
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)
{
string word = "";
......
......@@ -11,8 +11,8 @@ namespace EnvigoHiring.Models.Login
{
public class GLogin
{
public string clientid = "473716435734-bvubpa7ggdgus63255ku8mqh9buq7eki.apps.googleusercontent.com";
public string clientsecret = "30RPoRXZTZVCq6cqs9yWXg8W";
public string clientid = "261213523242-fjma3ocn8aes9dda9grlu15jpmkti799.apps.googleusercontent.com";
public string clientsecret = "c2btFMstqHWoVi2qi7QgdrpQ";
public string redirection_url = ConfigurationManager.AppSettings["SiteUrl"].ToString().Trim() + "login";
public GLogin()
{
......
......@@ -40,7 +40,7 @@ namespace EnvigoHiring.Models.Login
string status = dt.Rows[0]["status"].ToString().Trim();
if (status == "0")
{
HttpContext.Current.Response.Redirect("login/thankyou");
HttpContext.Current.Response.Redirect("login/thankyou?email="+Email);
//Take to thank you page
}
else
......@@ -127,6 +127,7 @@ namespace EnvigoHiring.Models.Login
return false;
}
}
public void alert(string message, bool success)
{
lblMessage = message;
......
......@@ -7,6 +7,7 @@ using CommonFunc;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient;
using System.Web.Mvc;
using System.Configuration;
namespace EnvigoHiring.Models.Position
{
......@@ -84,13 +85,50 @@ namespace EnvigoHiring.Models.Position
{
sv.isSuccess = true;
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)
{
sv.isSuccess = true;
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
......@@ -110,6 +148,25 @@ namespace EnvigoHiring.Models.Position
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblJobDescription_Approve", perm1);
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.Message = "<b>Success :</b> Job Description approved successfully.";
HttpContext.Current.Response.Redirect("/position/viewposition");
......@@ -131,6 +188,25 @@ namespace EnvigoHiring.Models.Position
DataTable success1 = obj.ExecuteStoreProcedure("proc_tblJobDescription_Approve", perm1);
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.Message = "<b>Success :</b> Job Description rejected successfully.";
HttpContext.Current.Response.Redirect("/position/viewposition");
......
......@@ -163,6 +163,24 @@ namespace EnvigoHiring.Models.Position
{
sv.isSuccess = true;
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;
}
else
......@@ -238,7 +256,11 @@ namespace EnvigoHiring.Models.Position
{
if (Status == "OnHold")
{
return Common.FillSelectListManual("OnHold","ReOpen");
return Common.FillSelectListManual("OnHold", "ReOpen");
}
else if (Status == "ReOpen")
{
return Common.FillSelectListManual("Open", "ReOpen", "OnHold");
}
else
{
......
......@@ -7,6 +7,7 @@ using System.Web.Mvc;
using CommonFunc;
using System.Data.SqlClient;
using System.ComponentModel.DataAnnotations;
using System.Configuration;
namespace EnvigoHiring.Models.User
{
......@@ -17,6 +18,7 @@ namespace EnvigoHiring.Models.User
public string PageHeading { get; set; }
public string UserName { get; set; }
public string Email { get; set; }
public string EmailID { get; set; }
public bool chkActive { get; set; }
public int Status { get; set; }
[Required(ErrorMessage = "Alert! Select Roles")]
......@@ -43,6 +45,7 @@ namespace EnvigoHiring.Models.User
result = true;
DataRow row = dt.Rows[0];
Email = row.SetParamValue("UserEmail");
EmailID= row.SetParamValue("UserEmail");
UserName = row.SetParamValue("UserName");
ddlRoles = row.SetParamValue("Role");
chkActive = (row.SetParamValue("status") == "1") ? true : false;
......@@ -76,6 +79,17 @@ namespace EnvigoHiring.Models.User
sv.Message = "<b>Error :</b> Please try again later.";
}
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()
......
......@@ -118,7 +118,7 @@
<tr><th colspan="4">Interview Details</th></tr>
@*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)
{
for (int i = 0; i < Model.ApplicantRounds.Rows.Count; i++)
......@@ -128,6 +128,7 @@
RoundType = Convert.ToString(dr["RoundType"]).Trim();
NewInterview = dr.SetParamValue("NewInterview").ToInt32();
InterviewType = dr.SetParamValue("Status");
SuggestedApplicantCount = dr.SetParamValue("SuggestedApplicantCount").ToInt32();
//if (RoundType != null && RoundType != "")
{
<tr>
......@@ -135,7 +136,7 @@
<th colspan="2">
@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" }))
{
......@@ -154,12 +155,38 @@
<th>Assigned To</th>
<td>@HttpUtility.HtmlDecode(dr["UserName"].ToString().Trim())</td>
</tr>
if (interviewStatus == "1" && dr.SetParamValue("SheduledOn").ToDateTime() < DateTime.Now)
{
using (Html.BeginForm("interviewstatus/" + dr["ApplicantID"].ToString().Trim(), null, FormMethod.Post, new { enctype = "multipart/form-data", id = "formdel", @class = "form-horizontal form-label-left" }))
{
@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)
{
var filteredDataRows = Model.RoundsRating.Select("RoundID=" + dr["RoundID"].ToString().Trim());
......@@ -179,11 +206,13 @@
</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" }))
......@@ -215,7 +244,8 @@
<tr>
<th colspan="2">Next Round</th>
<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 = "Telephonic" , text = "Telephonic" },
new { value = "F2F" , text = "F2F" }}, "value", "text"), new { @class = "form-control", autofocus = "autofocus" })
</td>
......
......@@ -61,6 +61,7 @@
<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>
......@@ -92,7 +93,7 @@
<span class="fa fa-angle-down"></span>
</a>
<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>
</li>
</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 @@
@if (role == "Admin" || role == "Recruiter")
{
<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">
<li><a href="/candidate/viewcandidate">View Candidate</a></li>
<li><a href="/candidate/addcandidate">Add Candidate</a></li>
......@@ -14,7 +14,7 @@
@if (role == "Admin" || role == "Recruiter" || role == "HR")
{
<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">
@*<li><a href="tables.html">Review applicants</a></li>*@
<li><a href="/applicants">applicants for interview</a></li>
......@@ -24,7 +24,7 @@
@if (role == "Admin" || role == "Recruiter" || role == "User")
{
<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">
<li><a href="/position/viewposition">View Open Positions</a></li>
<li><a href="/position/view-inactive-position">View Closed/OnHold Positions</a></li>
......@@ -38,7 +38,7 @@
@if (role == "Admin")
{
<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">
<li><a href="/user/activeusers">View Users</a></li>
<li><a href="/user/pendingusers">Pending Users</a></li>
......@@ -46,7 +46,7 @@
</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">
<li><a href="/department">View Departments</a></li>
<li><a href="/department/add">Add Department</a></li>
......
......@@ -42,7 +42,7 @@
{
string applicantid = applicantList[i].ApplicantID.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 positionStatus = applicant[0]["Status"].ToString().Trim();
if (applicant != null)
......@@ -52,8 +52,8 @@
string downloadLink = (resume == "") ? Googleresume : Model.FilePath + "/" + resume;
<tr>
<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 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 />
<a style="color:green;text-decoration:underline;" href="/applicantdisplayall/index/@applicant[0].SetParamValue("ApplicantID").ToInt32()">@applicant[0]["Name"].ToString().Trim()</a><br />
@applicant[0]["DesignationName"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["UnitName"].ToString().Trim().HtmlDecode()<br />
@applicant[0]["Cstage"].ToString().Trim().HtmlDecode()
</td>
......@@ -77,7 +77,8 @@
string ScheduleDate = applicant[k]["SheduledOn"].ToString().Trim();
ScheduleDate = (ScheduleDate == "") ? "" : ScheduleDate.ToDateTime().ToString("dd MMM yyyy hh:mm tt");
string InterViewResult = applicant[k]["InterViewResult"].ToString().Trim();
InterViewResult = (InterViewResult == "") ? positionStatus : InterViewResult;
string InterViewStatusName = applicant[k]["InterViewStatusname"].ToString().Trim();
InterViewResult = (InterViewResult == "") ? InterViewStatusName : InterViewResult;
<td>
Sheduled: @ScheduleDate<br />
Assigned: @applicant[k]["InterviewerName"].ToString().Trim().HtmlDecode()<br />
......@@ -93,13 +94,25 @@
}
<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 />
<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 />
}
</td>
</tr>
}
}
......
......@@ -15,6 +15,34 @@
<h2>Applicant Details</h2>
}
<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)
{
var row = Model.dtApplicant.Rows[0];
......
......@@ -132,7 +132,7 @@
@Html.TextBoxFor(m => m.BuyOutCost, new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
</div>
</div>
if (Model.CandidateID > 0)
if (Model.ApplicantID > 0)
{
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="ContactNo">
......
......@@ -151,13 +151,13 @@
<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 />
<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">
Activate
......
......@@ -56,20 +56,54 @@
<label class="control-label col-md-3 col-sm-3 col-xs-12" style="padding-top:0px;" for="DesignationName">
Designation :
</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" })
</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 class="item form-group">
<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>
@*<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" })
</div>*@
</div>
<div class="ln_solid"></div>
<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">
<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">
<thead>
<tr>
......@@ -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>
}
}
<input type="hidden" class="hdnCType" name="hdnCType" value="@cstatus" />
</td>
<td>@Html.Raw(HttpUtility.HtmlDecode(candidate[0]["Name"].ToString().Trim()))</td>
<td>@Html.Raw(HttpUtility.HtmlDecode(candidate[0]["EmailID"].ToString().Trim()))</td>
......

@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
ViewBag.Title = "Dashboard";
Layout = "~/Views/Shared/_Layoutdashboard.cshtml";
}
<h2>Index</h2>
@Users.LoginDetail().UserEmail <br />
@Users.LoginDetail().UserName <br />
@Users.LoginDetail().UserID <br />
@Users.LoginDetail().Roles <br />
<h2>Dashboard</h2>
@*@Users.LoginDetail().UserEmail <br />
@Users.LoginDetail().UserName <br />
@Users.LoginDetail().UserID <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 @@
<section class="login_content">
<form>
<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="clearfix"></div>
<br />
......
......@@ -100,7 +100,7 @@
<td>
@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>
}
......
......@@ -46,7 +46,7 @@
User Name <span class="required">*</span>
</label>
<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 class="item form-group">
......@@ -54,7 +54,8 @@
Email <span class="required">*</span>
</label>
<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 class="item form-group">
......
......@@ -12,6 +12,9 @@
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="SecurityKey" value="dslkghsdfjgsdjjhsd45sflj92384o32sdfkjfasdjf9832jsdlkesr3244wfdsa" />
<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>
<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" />
......
......@@ -12,6 +12,9 @@
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
<add key="SecurityKey" value="dslkghsdfjgsdjjhsd45sflj92384o32sdfkjfasdjf9832jsdlkesr3244wfdsa" />
<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>
<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" />
......
......@@ -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) {
var NQSArray = newquerystring.split('&');
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