Commit 5f9aa229 by Ajeet Kumar

27-09-2019

parent 75c83b20
......@@ -20,8 +20,10 @@ namespace EnvigoHiring.Models.Applicants
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; }
[Range(1, 100000000, ErrorMessage = "Alert! Current Salary should be greater then 0")]
[Required(ErrorMessage = "Alert! Current Salary should not be empty")]
public double CurrentSalary { get; set; }
public double ExpectedSalary { get; set; }
......@@ -29,8 +31,11 @@ namespace EnvigoHiring.Models.Applicants
public string LastAppraised { get; set; }
public string ddlBuyOut { get; set; }
public double BuyOutCost { get; set; }
[Required(ErrorMessage = "Alert! Select interview round")]
public string ddlInterviewRound { get; set; }
//[Required(ErrorMessage = "Alert! Interviewer date should not be empty")]
public string Interviewdate { get; set; }
[Required(ErrorMessage = "Alert! Select Interviewer")]
public string Interviewer { get; set; }
public string ddlInterviewStage { get; set; }
public bool HideInterview { get; set; }
......@@ -45,7 +50,9 @@ namespace EnvigoHiring.Models.Applicants
,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 apl.PositionID={1} order by round.roundtype desc", CandidateID, PositionID);
(sa.Candidate=cand.CandidateID) where sa.CurrentStatus='Approve' and sa.Candidate={0} and sa.PositionID={1}
and (apl.PositionID=(select IIF(EXISTS(SELECT 1 FROM tblApplicants where PositionID = sa.PositionID and candidateID=sa.Candidate), sa.PositionID, (select top 1 PositionID from tblApplicants where CandidateID=1 order by createdate desc))) or apl.positionID is null)
order by round.roundtype desc", CandidateID, PositionID);
DataTable dt = obj.SelectDatatable(query);
if (dt != null && dt.Rows.Count > 0)
{
......@@ -72,7 +79,7 @@ namespace EnvigoHiring.Models.Applicants
Interviewer = row.SetParamValue("Interviewer");
ddlInterviewStage = row.SetParamValue("Stage");
}
if (ddlInterviewRound!=null && ddlInterviewRound != "")
if (ddlInterviewRound!=null && ddlInterviewRound != "" && ApplicantID>0)
{
HideInterview = true;
}
......@@ -91,6 +98,13 @@ namespace EnvigoHiring.Models.Applicants
validate vm = new validate();
vm = ValidationFunc.ValidateModelData<ApplicantsDetail>(this, "NoticePeriod", "CurrentSalary", "ExpectedSalary",
"Hikepercentage", "LastAppraised", "ddlBuyOut", "BuyOutCost", "ddlInterviewRound", "Interviewdate", "Interviewer");
vm.isValid = true;
if (!CheckFunc.IsDate(LastAppraised))
{
vm.isValid = false;
vm.Message = "Alert! Last Appraised is not valid datetime type";
}
if (HideInterview==false && !CommonFunctions.IsDate(Interviewdate))
{
vm.isValid = false;
......@@ -101,7 +115,19 @@ namespace EnvigoHiring.Models.Applicants
vm.isValid = false;
vm.Message = "Alert! Fill either excpected salary or hike percentage";
}
if (ddlInterviewRound != null && ddlInterviewRound != "")
{
if (Interviewdate == null || Interviewdate == "")
{
vm.isValid = false;
vm.Message = "Alert! Interview date should not be blank";
}
if (!CheckFunc.IsDate(Interviewdate))
{
vm.isValid = false;
vm.Message = "Alert! Interview date is not valid datetime type";
}
}
return vm;
}
public SaveData Save()
......
......@@ -19,7 +19,7 @@ namespace EnvigoHiring.Models.CandidatePool
[Required(ErrorMessage = "Required! Select gender")]
public string Gender { get; set; }
[Required(ErrorMessage = "Required! Candidate Experience should not be empty")]
public Double Experience { get; set; }
public double Experience { get; set; }
[RegularExpression(@"^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$", ErrorMessage = "Alert! Invalid email address!")]
[Required(ErrorMessage = "Required! Email address should not be empty")]
public string EmailID { get; set; }
......
......@@ -64,7 +64,7 @@ namespace EnvigoHiring.Models.CandidateSelection
tblMasterDepartment AS t2 ON t.InterestedDepartmentID = t2.DepartmentID left outer join tblApplicants apl on (t1.PositionID=apl.PositionID and t.CandidateID=apl.CandidateID)
left outer join (select rounds.ApplicantID,SheduledOn,InterviewStatus,PositionID,Rank() over (Partition BY PositionID,rounds.CandidateID ORDER BY rounds.Createdate desc ) AS Rank from tblInterviewRounds rounds
inner join tblapplicants apl on (rounds.ApplicantID=apl.ApplicantID) ) as r on (apl.ApplicantID=r.ApplicantID) left outer join tblMasterInterviewStatus mis on (r.InterviewStatus=mis.InterviewStatusID)
WHERE (t1.PositionID = {0}) and (rank=1 or rank is null)", PositionID);
WHERE (t1.PositionID = {0}) and t1.CurrentStatus<>'Reject' and (rank=1 or rank is null)", PositionID);
return obj.SelectDatatable(query);
}
public void ApproveCand(int CandID)
......
......@@ -1019,7 +1019,7 @@ System.UInt32 dwReserverd);
// smtp.UseDefaultCredentials = false;
try
{
smtp.Send(Msg);
//smtp.Send(Msg);
//Msg.Dispose();
i = 1;
......
......@@ -74,16 +74,50 @@ namespace CommonFunc
string ErrorMessage = (attr.GetType().GetProperty("ErrorMessage") != null) ? Convert.ToString(attr.GetType().GetProperty("ErrorMessage").GetValue(attr, null)) : "";
//required field validator
if (datatype.ToLower() == "int")
{
if (!CheckFunc.IsNumeric(values))
{
conds += "<li>" + VariableName + ": is not numeric</li>";
result = false;
}
}
if (datatype.ToLower() == "double" || datatype.ToLower() == "float")
{
if (!CheckFunc.IsDouble(values))
{
conds += "<li>" + VariableName + ": is not decimal or integer</li>";
result = false;
}
}
if (attr is RequiredAttribute)
{
if (values == null || values == "")
{
conds += "<li>" + VariableName + ":" + ErrorMessage + "</li>";
conds += "<li>" + VariableName + ": " + ErrorMessage + "</li>";
result = false;
}
if (datatype.ToLower() == "int")
{
if (Convert.ToInt32(values) <= 0)
{
conds += "<li>" + VariableName + ": " + ErrorMessage + "</li>";
result = false;
}
}
if (datatype.ToLower() == "double")
{
if (Convert.ToDouble(values) <= 0)
{
conds += "<li>" + VariableName + ": " + ErrorMessage + "</li>";
result = false;
}
}
}
//if Variable declared with [AllowHtml]
if (isHtmlAttribute==true)
if (isHtmlAttribute == true)
{
if (!SpecialCharacterFunc.TextAreaString(HttpUtility.HtmlDecode(values)))
{
......@@ -121,20 +155,6 @@ namespace CommonFunc
}
}
}
if (datatype.ToLower() == "int")
{
if (!CheckFunc.IsNumeric(values))
{
conds += "<li>" + VariableName + ": number is not numeric</li>";
}
}
if (datatype.ToLower() == "double")
{
if (!CheckFunc.IsDouble(values))
{
conds += "<li>" + VariableName + ": Number is not decimal or integer</li>";
}
}
if (attr is RangeAttribute)
{
if (Int32.Parse(values) < Int32.Parse((attr as RangeAttribute).Minimum.ToString()) && Int32.Parse(values) > Int32.Parse((attr as RangeAttribute).Minimum.ToString()))
......@@ -165,7 +185,7 @@ namespace CommonFunc
{
if (!CheckFunc.IsEmail(values))
{
conds += "<li>" + VariableName + ":" + ErrorMessage + "</li>";
conds += "<li>" + VariableName + ": " + ErrorMessage + "</li>";
result = false;
}
}
......@@ -179,7 +199,7 @@ namespace CommonFunc
Match m = Regex.Match(values, @"" + pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);
if (m.Success == false)
{
conds += "<li>" + VariableName + ":" + ErrorMessage + "</li>";
conds += "<li>" + VariableName + ": " + ErrorMessage + "</li>";
result = false;
}
}
......@@ -190,7 +210,7 @@ namespace CommonFunc
bool results = lengthValidate(values, (attr as StringLengthAttribute).MinimumLength, (attr as StringLengthAttribute).MaximumLength);
if (results == false)
{
conds += "<li>" + VariableName + ":" + ErrorMessage + "</li>";
conds += "<li>" + VariableName + ": " + ErrorMessage + "</li>";
result = false;
}
}
......@@ -200,7 +220,7 @@ namespace CommonFunc
}
// Add all validation error
if (conds.Length > 0)
Message += String.Format("\n\t {0} <br/>", conds);
Message += String.Format("{0}", conds);
}
vm.isValid = result;
vm.Message = Message;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
public static class CheckBoxList
{
public static MvcHtmlString CheckBoxListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> SelectedItem, List<SelectListItem> list)
{
var sb = new StringBuilder();
string selected = "";
if (list != null)
{
int i = 0;
foreach (var l in list)
{
string collectionNameIndex = String.Format("{0}[{1}]", SelectedItem.Name, i);
var hiddenName = new TagBuilder("input");
hiddenName.Attributes.Add(new KeyValuePair<string, string>("type", "hidden"));
hiddenName.Attributes.Add(new KeyValuePair<string, string>("name", String.Format("{0}.{1}", collectionNameIndex, "Text")));
hiddenName.Attributes.Add(new KeyValuePair<string, string>("value", l.Text));
var hiddenValue = new TagBuilder("input");
hiddenValue.Attributes.Add(new KeyValuePair<string, string>("type", "hidden"));
hiddenValue.Attributes.Add(new KeyValuePair<string, string>("name", String.Format("{0}.{1}", collectionNameIndex, "Value")));
hiddenValue.Attributes.Add(new KeyValuePair<string, string>("value", l.Value));
string ID = ("," + SelectedItem.ToString() + ",").Contains("," + l.Value + ",") ? l.Value + "," : "";
var checkBoxTag = htmlHelper.CheckBox(String.Format("{0}.{1}", collectionNameIndex, "Selected"), ID==""?false:true);
selected += ("," + SelectedItem.ToString() + ",").Contains("," + l.Value + ",") ? l.Value+"," : "";
var labelTag = new TagBuilder("label");
labelTag.Attributes.Add(new KeyValuePair<string, string>("for", String.Format("{0}.{1}", collectionNameIndex, "Name")));
labelTag.SetInnerText(l.Text);
sb.Append(hiddenName);
sb.Append(hiddenValue);
sb.Append(checkBoxTag);
sb.Append(labelTag);
sb.Append("<br/>");
i++;
}
}
//selected= selected?.Substring(0, selected.Length - 1)??"";
return MvcHtmlString.Create(sb.ToString());
//var antiForgeryInputTag = helper.AntiForgeryToken().ToString();
//// Above gets the following: <input name="__RequestVerificationToken" type="hidden" value="PnQE7R0MIBBAzC7SqtVvwrJpGbRvPgzWHo5dSyoSaZoabRjf9pCyzjujYBU_qKDJmwIOiPRDwBV1TNVdXFVgzAvN9_l2yt9-nf4Owif0qIDz7WRAmydVPIm6_pmJAI--wvvFQO7g0VvoFArFtAR2v6Ch1wmXCZ89v0-lNOGZLZc1" />
//var removedStart = antiForgeryInputTag.Replace(@"<input name=""__RequestVerificationToken"" type=""hidden"" value=""", "");
//var tokenValue = removedStart.Replace(@""" />", "");
//if (antiForgeryInputTag == removedStart || removedStart == tokenValue)
// throw new InvalidOperationException("Oops! The Html.AntiForgeryToken() method seems to return something I did not expect.");
////return new MvcHtmlString(string.Format(@"{0}:""{1}""", "__RequestVerificationToken", tokenValue));
//return new MvcHtmlString(string.Format("{0}", tokenValue));
}
}
......@@ -29,10 +29,9 @@ namespace EnvigoHiring.Models.Position
public string RequestDate { get; set; }
[Required(ErrorMessage = "Alert! ClosedBy Date should not be blank")]
public string ClosedByDate { get; set; }
[Required(ErrorMessage = "Alert! Experience should not be blank")]
[Required(ErrorMessage = "Alert! Experience should be grater then 0")]
public double Experience { get; set; }
[Required(ErrorMessage = "Alert! Yearly Salary Budget should not be blank")]
[RegularExpression(@"^[0-9.]+$", ErrorMessage = "Alert! Yearly Salary Budget Should be numeric")]
public double YearlySalaryBudget { get; set; }
public string Status { get; set; }
public List<SelectListItem> Designation { get; set; }
......@@ -188,6 +187,22 @@ namespace EnvigoHiring.Models.Position
sv.isSuccess = true;
sv.Message = "<b>Success :</b> Page updated 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$$", "Existing Position updated!");
StrMail = StrMail.Replace("$$Content$$", "Dear Recruiter,<br/><br/> Existing position has been updated 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("Existing Position Updated - Envigo Hiring", emails, StrMail);
}
//End Send Email
return sv;
}
}
......@@ -214,20 +229,21 @@ namespace EnvigoHiring.Models.Position
{
string subquery = (Users.LoginDetail().Roles == "User") ? "and t.RequesterID=" + UserID.ToInt32() : "";
string query = string.Format(@"select PositionID,DepartmentName,DesignationName,UnitName,Priority,TAT,ClosedByDate, t.status ,t.Experience,t.YearlySalaryBudget
,(select count(1) from tblSuggestedApplicants where positionid=t.positionid) as Tcount
,(select count(1) from tblSuggestedApplicants where positionid=t.positionid) as Tcount,u.username
,(select count(1) from tblSuggestedApplicants where currentstatus='Approve' and positionid=t.positionid) as TApprvcount from tblPositions t
inner join tblMasterDepartment dept on (t.Department=dept.DepartmentID) inner join tblMasterDesignation desg on (t.DesignationID=desg.DesignationID)
inner join tblMasterUnit unt on (t.Unit=unt.unitID) where (t.status='Open' or t.status='ReOpen') {0} order by t.RequestDate desc", subquery);
inner join tblMasterUnit unt on (t.Unit=unt.unitID) inner join tblUserLogin u on (t.RequesterID=u.UserID) where (t.status='Open' or t.status='ReOpen') {0} order by t.RequestDate desc", subquery);
return obj.SelectDatatable(query);
}
public DataTable viewInActivePosition()
{
string subquery =(Users.LoginDetail().Roles=="User")? "and t.RequesterID="+UserID.ToInt32():"";
string query = string.Format(@"select PositionID,DepartmentName,DesignationName,UnitName,Priority,TAT,ClosedByDate, t.status ,t.Experience,t.YearlySalaryBudget
,(select count(1) from tblSuggestedApplicants where currentstatus='selected' and positionid=t.positionid) as Tcount
string query = string.Format(@"select PositionID,DepartmentName,DesignationName,UnitName,Priority,TAT,ClosedByDate, t.status ,t.Experience,t.YearlySalaryBudget,
(select name from tblMasterCandidatePool where candidateID=t.SelectedCandidateID) as selectedCandidate
,(select count(1) from tblSuggestedApplicants where currentstatus='selected' and positionid=t.positionid) as Tcount,u.username,t.Closure_Date
,(select count(1) from tblSuggestedApplicants where currentstatus='Approve' and positionid=t.positionid) as TApprvcount from tblPositions t
inner join tblMasterDepartment dept on (t.Department=dept.DepartmentID) inner join tblMasterDesignation desg on (t.DesignationID=desg.DesignationID)
inner join tblMasterUnit unt on (t.Unit=unt.unitID) where (t.status!='Open' and t.status!='ReOpen') {0} order by t.RequestDate desc", subquery);
inner join tblMasterUnit unt on (t.Unit=unt.unitID) inner join tblUserLogin u on (t.RequesterID=u.UserID) where (t.status!='Open' and t.status!='ReOpen') {0} order by t.RequestDate desc", subquery);
return obj.SelectDatatable(query);
}
public List<SelectListItem> DesignationList(string DepartmentID)
......
......@@ -400,7 +400,7 @@ $.extend($.validator, {
} else {
this.invalid[element.name] = true;
}
if ( !this.numberOfInvalids() ) {
if (!this.numberOfInvalids() ) {
// Hide error containers on last error
this.toHide = this.toHide.add( this.containers );
}
......@@ -584,11 +584,22 @@ $.extend($.validator, {
return false;
}
}
//Modification by Ajeet End
//Modification by Ajeet End // check for integer validation
for (var method in rules ) {
var rule = { method: method, parameters: rules[method] };
try {
var v = rule["parameters"];
////Addd for Modification for integer type
//if (method == "number" && rule["parameters"] == true)
//{
// if (val == 0)
// {
// dependencyMismatch = true;
// continue;
// }
//}
//dependencyMismatch = false;
////Modification End
result = $.validator.methods[method].call( this, val, element, rule.parameters );
// if a method indicates that the field is optional and therefore valid,
......
......@@ -73,11 +73,11 @@
<tr>
<th>Last Appraised</th>
<td>
<a>@Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("MMM yyyy")</a>
<a>@((dr["Last_Appraised_On"]!=null && dr["Last_Appraised_On"].ToString() != "") ? Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("MMM yyyy"):"")</a>
</td>
<th>Last Conatcted</th>
<td>
<a>@Convert.ToDateTime(HttpUtility.HtmlDecode(dr["Last_Appraised_On"].ToString().Trim())).ToString("dd MMM yy")</a>
<a>@((dr["LastContactedDate"]!=null && dr["LastContactedDate"].ToString() != "") ?Convert.ToDateTime(HttpUtility.HtmlDecode(dr["LastContactedDate"].ToString().Trim())).ToString("dd MMM yy"):"")</a>
</td>
</tr>
......
......@@ -189,7 +189,7 @@
</tr>
<tr id="rating">
<td colspan="2">
<table>
<table class="table table-striped table-bordered dataTable">
<tr>
<td>Comunication</td>
<td>
......
......@@ -47,7 +47,7 @@
Candidate Name
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.TextBoxFor(m=>m.Applicant, new { @class= "form-control col-md-7 col-xs-12", @readonly="readonly" })
@Html.TextBoxFor(m => m.Applicant, new { @class = "form-control col-md-7 col-xs-12", @readonly = "readonly" })
</div>
</div>
<div class="item form-group">
......@@ -113,7 +113,7 @@
Last Appraised On
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.TextBoxFor(m => m.LastAppraised, new { @class = "form-control col-md-7 col-xs-12 MonthDatepicker", autofocus = "autofocus" })
@Html.TextBoxFor(m => m.LastAppraised, new { @class = "form-control col-md-7 col-xs-12 MonthDatepicker", autofocus = "autofocus",required="required" })
</div>
</div>
<div class="item form-group">
......@@ -121,7 +121,7 @@
Is Buyout
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.DropDownListFor(m => m.ddlBuyOut,Model.BuyOutList(),"Select Buy Out", new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
@Html.DropDownListFor(m => m.ddlBuyOut, Model.BuyOutList(), "Select Buy Out", new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
</div>
</div>
<div class="item form-group">
......@@ -142,6 +142,12 @@
@Html.DropDownListFor(m => m.ddlInterviewStage, Model.IntervieweStageList(), new { @class = "form-control col-md-7 col-xs-12", autofocus = "autofocus" })
</div>
</div>
}
@Html.HiddenFor(m=>m.HideInterview)
if (Model.HideInterview == true)
{
Html.EnableClientValidation(false);
}
if (Model.HideInterview == false)
{
......@@ -159,7 +165,7 @@
Interview Date Time<span class="required">*</span>
</label>
<div class="col-md-6 col-sm-6 col-xs-12">
@Html.TextBoxFor(m => m.Interviewdate, new { @class = "form-control col-md-7 col-xs-12 myDatepicker", autofocus = "autofocus" })
@Html.TextBoxFor(m => m.Interviewdate, new { @class = "form-control col-md-7 col-xs-12 myDatepicker", autofocus = "autofocus", required="required" })
</div>
</div>
<div class="item form-group">
......@@ -176,10 +182,10 @@
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<a type="submit" class="btn btn-primary" href="/candidateselection/select/@Model.PositionID">Cancel</a>
<button id="send" type="submit" name="btnSubmit" value="Submit" class="btn btn-success">Submit</button>
<button id="send" type="submit" name="btnSubmit" value="Submit" class="btn btn-success btnsubmit">Submit</button>
</div>
</div>
@Html.HiddenFor(m=>m.HideInterview)
@Html.HiddenFor(m => m.HideInterview)
}
@section script{
<script src="/Scripts/jquery.validate.js"></script>
......@@ -190,8 +196,9 @@
<script src="/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
<script src="/vendors/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="/vendors/tinymce/tinymce.min.js" type="text/javascript"></script>
<script src="/vendors/custom.js"></script>
<script>
$('.myDatepicker').datetimepicker({minDate:-1 });
$('.myDatepicker').datetimepicker({ minDate: -1 });
$('.MonthDatepicker').datetimepicker({
format: 'MMM-YYYY'
});
......
......@@ -68,7 +68,7 @@
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<a class="btn btn-success" href="/position/viewposition">Cancel</a>
<button id="btnsubmit" type="submit" name="btnsubmit" value="Submit" class="btn btn-success">Submit</button>
<button id="btnsubmit" type="submit" name="btnsubmit" value="Submit" class="btn btn-success btnsubmit">Submit</button>
@if (Model.JDStatus > 0)
{
......
......@@ -30,23 +30,25 @@
<h2>View Manpower Requisition</h2>
}
<div class="x_content">
@if (Model.dtPosition != null && Model.dtPosition.Rows.Count > 0)
{
<table id="datatable" class="table table-striped table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Job</th>
<th>Priority</th>
<th>Experience</th>
<th>Exp</th>
<th>Budget</th>
<th>TAT</th>
<th>Closed Date</th>
<th>Requester</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@if (Model.dtPosition != null && Model.dtPosition.Rows.Count > 0)
{
foreach (System.Data.DataRow row in Model.dtPosition.Rows)
@foreach (System.Data.DataRow row in Model.dtPosition.Rows)
{
int JDStatus = Model.JobDescriptionStatus(BasicFunc.SetParamValue(row, "PositionID"));
string role = Users.LoginDetail().Roles;
......@@ -61,6 +63,10 @@
<br />
<strong>Designation:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "DesignationName"))<br />
<strong>Unit:</strong> @Html.Raw(BasicFunc.SetParamValue(row, "UnitName"))
@*@if (row.SetParamValue("Status").ToLower() == "closed")
{
<strong>Selected Candidate:</strong>@row.SetParamValue("selectedCandidate")
}*@
</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "Priority"))</td>
......@@ -68,10 +74,11 @@
<td>@Budeget</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "TAT").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "ClosedByDate").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td>@row.SetParamValue("UserName")</td>
<td>
@if (row.SetParamValue("status").ToLower() != "open" && row.SetParamValue("status").ToLower() != "reopen")
{
if (row.SetParamValue("status").ToLower() != "onhold" && row.SetParamValue("status").ToLower()!="closed")
if (row.SetParamValue("status").ToLower() != "closed")
{
<a title='Edit Record' style='cursor:pointer;' href='/position/addposition/@row["PositionID"].ToString().Trim()'> <i class='fa fa-edit'></i></a>
}
......@@ -84,9 +91,10 @@
</td>
</tr>
}
}
</tbody>
</table>
}
</div>
@section script{
......
......@@ -36,10 +36,11 @@
<th>ID</th>
<th>Job</th>
<th>Priority</th>
<th>Experience</th>
<th>Exp</th>
<th>Budget</th>
<th>TAT</th>
<th>Closed Date</th>
<th>Requester</th>
<th>Action</th>
</tr>
</thead>
......@@ -97,6 +98,7 @@
<td>@Budeget</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "TAT").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td>@Html.Raw(BasicFunc.SetParamValue(row, "ClosedByDate").ToDateTime().ToString("dd, MMM yyyy"))</td>
<td>@row.SetParamValue("UserName")</td>
<td>
@if (row.SetParamValue("status").ToLower() == "open" || row.SetParamValue("status").ToLower() == "reopen")
{
......
......@@ -247,7 +247,12 @@ function ValidateCheckbox()
}
}
}
$(".btnsubmit").click(function () {
$("[data-valmsg-summary=true]").find("ul").find("li").remove();
$("[data-valmsg-summary=true]").addClass("alert-danger").addClass("in").removeClass("alert-success");
$("[data-valmsg-summary=true]").addClass("alert alert-danger").addClass("in").removeClass("alert-success");
});
$("button.close").click(function () {
$("[data-valmsg-summary=true]").find("ul").find("li").remove();
$("[data-valmsg-summary=true]").removeClass("alert");
});
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