public ActionResult EditWorkExperience(int id) //Get-Editing work experience details { WorkExperiences experiences = this.jobMediator.FetchSingleWorkExperience(id); var map = AutoMapper.Mapper.Map <WorkExperiences, WorkExperienceViewModel>(experiences); return(View(map)); }
/// <summary> /// Persons the education work experiences delete dal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <returns>System.Int32.</returns> public int PersonEducationWorkExperiences_DeleteDAL(WorkExperiences _objWorkExperiences) { return(ExecuteScalarInt32Sp("TMS_PersonEducationWorkExperiences_Delete", ParamBuilder.Par("ID", _objWorkExperiences.ID), ParamBuilder.Par("UpdatedBy", _objWorkExperiences.UpdatedBy), ParamBuilder.Par("UpdatedDate", _objWorkExperiences.UpdatedDate))); }
/// <summary> /// Persons the education work experiences duplication check dal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <param name="pid">The pid.</param> /// <returns>System.Int32.</returns> public int PersonEducationWorkExperiences_DuplicationCheckDAL(WorkExperiences _objWorkExperiences, string pid) { return(ExecuteScalarSPInt32("TMS_PersonEducationWorkExperiences_DuplicationCheck", ParamBuilder.Par("PersonID", pid), ParamBuilder.Par("StartDate", _objWorkExperiences.StartTimePeriod), ParamBuilder.Par("EndDate", _objWorkExperiences.EndTimePeriod), ParamBuilder.Par("JobStatus", _objWorkExperiences.JobStatus))); }
public void AddExperience(WorkExperiences work) //Add work experience { using (DBUtills dB = new DBUtills()) { dB.WorkExperienceDb.Add(work); dB.SaveChanges(); } }
public void RemoveExperience(int idValue) //Delete experience { using (DBUtills dBUtills = new DBUtills()) { WorkExperiences work = dBUtills.WorkExperienceDb.Find(idValue); dBUtills.WorkExperienceDb.Remove(work); dBUtills.SaveChanges(); } }
public WorkExperiences FetchSingleWorkExperience(int log) //Extract single work experience { WorkExperiences work = null; using (DBUtills dB = new DBUtills()) { work = dB.WorkExperienceDb.Find(log); return(work); } }
public virtual void RemoveWorkExperience(int Id) { foreach (WorkExperience WE in WorkExperiences) { if (WE.Id == Id) { WorkExperiences.Remove(WE); break; } } }
public bool UpdateExperience(WorkExperiences experience) //Update experience { bool status = false; using (DBUtills dBUtills = new DBUtills()) { dBUtills.Entry(experience).State = EntityState.Modified; dBUtills.SaveChanges(); status = true; } return(status); }
/// <summary> /// Persons the education work experiences update dal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <returns>System.Int32.</returns> public int PersonEducationWorkExperiences_UpdateDAL(WorkExperiences _objWorkExperiences) { return(ExecuteScalarInt32Sp("TMS_PersonEducationWorkExperiences_Update", ParamBuilder.Par("ID", _objWorkExperiences.ID), ParamBuilder.Par("OrganizationID", _objWorkExperiences.OrganizationID), ParamBuilder.Par("CompanyName", _objWorkExperiences.CompanyName), ParamBuilder.Par("RelationType", _objWorkExperiences.RelationType), ParamBuilder.Par("P_Title", _objWorkExperiences.P_Title), ParamBuilder.Par("S_Title", _objWorkExperiences.S_Title), ParamBuilder.Par("JobStatus", _objWorkExperiences.JobStatus), ParamBuilder.Par("Location", _objWorkExperiences.Location), ParamBuilder.Par("StartTimePeriod", _objWorkExperiences.StartTimePeriod), ParamBuilder.Par("EndTimePeriod", _objWorkExperiences.EndTimePeriod), ParamBuilder.Par("IsCurrent", _objWorkExperiences.IsCurrent), ParamBuilder.Par("ReferenceName", _objWorkExperiences.ReferenceName), ParamBuilder.Par("ReferenceEmail", _objWorkExperiences.ReferenceEmail), ParamBuilder.Par("ReferencePhone", _objWorkExperiences.ReferencePhone), ParamBuilder.Par("Description", _objWorkExperiences.Description), ParamBuilder.Par("UpdatedBy", _objWorkExperiences.UpdatedBy), ParamBuilder.Par("UpdatedDate", _objWorkExperiences.UpdatedDate))); }
/// <summary> /// Persons the education work experiences create dal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <returns>System.Int64.</returns> public long PersonEducationWorkExperiences_CreateDAL(WorkExperiences _objWorkExperiences) { var parameters = new[] { ParamBuilder.Par("ID", 0) }; return(ExecuteInt64withOutPutparameterSp("TMS_PersonEducationWorkExperiences_Create", parameters, ParamBuilder.Par("PersonID", _objWorkExperiences.PersonID), ParamBuilder.Par("OrganizationID", _objWorkExperiences.OrganizationID), ParamBuilder.Par("RelationType", _objWorkExperiences.RelationType), ParamBuilder.Par("CompanyName", _objWorkExperiences.CompanyName), ParamBuilder.Par("P_Title", _objWorkExperiences.P_Title), ParamBuilder.Par("S_Title", _objWorkExperiences.S_Title), ParamBuilder.Par("JobStatus", _objWorkExperiences.JobStatus), ParamBuilder.Par("Location", _objWorkExperiences.Location), ParamBuilder.Par("StartTimePeriod", _objWorkExperiences.StartTimePeriod), ParamBuilder.Par("EndTimePeriod", _objWorkExperiences.EndTimePeriod), ParamBuilder.Par("IsCurrent", _objWorkExperiences.IsCurrent), ParamBuilder.Par("ReferenceName", _objWorkExperiences.ReferenceName), ParamBuilder.Par("ReferenceEmail", _objWorkExperiences.ReferenceEmail), ParamBuilder.Par("ReferencePhone", _objWorkExperiences.ReferencePhone), ParamBuilder.Par("Description", _objWorkExperiences.Description), ParamBuilder.Par("CreatedBy", _objWorkExperiences.CreatedBy), ParamBuilder.Par("CreatedDate", _objWorkExperiences.CreatedDate))); }
public bool UpdateExperience(WorkExperiences experience) //Update work experience of searcher { return(jobRepository.UpdateExperience(experience)); }
public ActionResult PersonWorkExperience_Destroy([DataSourceRequest] DataSourceRequest request, WorkExperiences _personWorkExperiences) { if (ModelState.IsValid) { _personWorkExperiences.UpdatedBy = CurrentUser.NameIdentifierInt64; _personWorkExperiences.UpdatedDate = DateTime.Now; var result = _PersonEducationBAL.PersonEducationWorkExperiences_DeleteDAL(_personWorkExperiences); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } var resultData = new[] { _personWorkExperiences }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public ActionResult PersonWorkExperience_Create([DataSourceRequest] DataSourceRequest request, string pid, WorkExperiences _personWorkExperiences) { var now = DateTime.Now; var startOfMonth = new DateTime(now.Year, now.Month, 1); if (_personWorkExperiences.IsCurrent) { _personWorkExperiences.EndTimePeriod = startOfMonth; } if (ModelState.IsValid) { if (_personWorkExperiences.OrganizationID == -1) { _personWorkExperiences.CreatedBy = CurrentUser.NameIdentifierInt64; _personWorkExperiences.CreatedDate = DateTime.Now; _personWorkExperiences.PersonID = Convert.ToInt64(pid); _personWorkExperiences.StartTimePeriod = new DateTime(_personWorkExperiences.StartTimePeriod.Year, _personWorkExperiences.StartTimePeriod.Month, 1); if (_personWorkExperiences.OrganizationID == -1) { _personWorkExperiences.OrganizationID = 0; } var result = _PersonEducationBAL.PersonEducationWorkExperiences_CreateDAL(_personWorkExperiences); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.PersonEducationCertificationsDuplicationMessage); } else { _personWorkExperiences.ID = result; } } else { if (_PersonEducationBAL.PersonEducationWorkExperiences_DuplicationCheckBAL(_personWorkExperiences, pid) == 0) { _personWorkExperiences.CreatedBy = CurrentUser.NameIdentifierInt64; _personWorkExperiences.CreatedDate = DateTime.Now; _personWorkExperiences.PersonID = Convert.ToInt64(pid); _personWorkExperiences.StartTimePeriod = new DateTime(_personWorkExperiences.StartTimePeriod.Year, _personWorkExperiences.StartTimePeriod.Month, 1); if (_personWorkExperiences.OrganizationID == -1) { _personWorkExperiences.OrganizationID = 0; } var result = _PersonEducationBAL.PersonEducationWorkExperiences_CreateDAL(_personWorkExperiences); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.PersonEducationCertificationsDuplicationMessage); } else { _personWorkExperiences.ID = result; } } else { ModelState.AddModelError(lr.PersonEducationWorkExperiencesTimePeriod, lr.PersonEducationWorkExperiencesTwoJobCheck); } } } var resultData = new[] { _personWorkExperiences }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
public ActionResult PersonWorkExperience_Update([DataSourceRequest] DataSourceRequest request, WorkExperiences _personWorkExperiences) { if (_personWorkExperiences.IsCurrent) { _personWorkExperiences.EndTimePeriod = DateTime.Now; } if (ModelState.IsValid) { if (_personWorkExperiences.IsCurrent == false) { int result1 = DateTime.Compare(_personWorkExperiences.StartTimePeriod, _personWorkExperiences.EndTimePeriod); if (result1 == 1) { ModelState.AddModelError(lr.StartandEndDateConflict, lr.StartandEndDateConflict); } } _personWorkExperiences.UpdatedBy = CurrentUser.NameIdentifierInt64; _personWorkExperiences.UpdatedDate = DateTime.Now; if (_personWorkExperiences.OrganizationID == -1) { _personWorkExperiences.OrganizationID = 0; } var result = _PersonEducationBAL.PersonEducationWorkExperiences_UpdateDAL(_personWorkExperiences); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } var resultData = new[] { _personWorkExperiences }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public void CompletedExperience(WorkExperiences work) //Completed searcher experience { jobRepository.AddExperience(work); }
/// <summary> /// Persons the education work experiences create dal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <returns>System.Int64.</returns> public long PersonEducationWorkExperiences_CreateDAL(WorkExperiences _objWorkExperiences) { return(DAL.PersonEducationWorkExperiences_CreateDAL(_objWorkExperiences)); }
/// <summary> /// Persons the education work experiences duplication check bal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <param name="pid">The pid.</param> /// <returns>System.Int32.</returns> public int PersonEducationWorkExperiences_DuplicationCheckBAL(WorkExperiences _objWorkExperiences, string pid) { return(DAL.PersonEducationWorkExperiences_DuplicationCheckDAL(_objWorkExperiences, pid)); }
/// <summary> /// Persons the education work experiences delete dal. /// </summary> /// <param name="_objWorkExperiences">The object work experiences.</param> /// <returns>System.Int32.</returns> public int PersonEducationWorkExperiences_DeleteDAL(WorkExperiences _objWorkExperiences) { return(DAL.PersonEducationWorkExperiences_DeleteDAL(_objWorkExperiences)); }