/// <summary> /// Persons the education trainings delete dal. /// </summary> /// <param name="_objTrainings">The object trainings.</param> /// <returns>System.Int32.</returns> public int PersonEducationTrainings_DeleteDAL(PersonTrainings _objTrainings) { return(ExecuteScalarInt32Sp("TMS_PersonEducationTrainings_Delete", ParamBuilder.Par("ID", _objTrainings.ID), ParamBuilder.Par("UpdatedBy", _objTrainings.UpdatedBy), ParamBuilder.Par("UpdatedDate", _objTrainings.UpdatedDate))); }
/// <summary> /// Persons the education trainings update dal. /// </summary> /// <param name="_objTrainings">The object trainings.</param> /// <returns>System.Int32.</returns> public int PersonEducationTrainings_UpdateDAL(PersonTrainings _objTrainings) { return(ExecuteScalarInt32Sp("TMS_PersonEducationTrainings_Update", ParamBuilder.Par("ID", _objTrainings.ID), ParamBuilder.Par("TrainingP_Title", _objTrainings.TrainingP_Title), ParamBuilder.Par("TrainingS_Title", _objTrainings.TrainingS_Title), ParamBuilder.Par("TrainingType", _objTrainings.TrainingType), ParamBuilder.Par("DurationType", _objTrainings.DurationType), ParamBuilder.Par("CourseDuration", _objTrainings.CourseDuration), ParamBuilder.Par("CourseOutline", _objTrainings.CourseOutline), ParamBuilder.Par("LearningObjective", _objTrainings.LearningObjective), ParamBuilder.Par("ClientName", _objTrainings.ClientName), ParamBuilder.Par("ClientReferencePersonsName", _objTrainings.ClientReferencePersonsName), ParamBuilder.Par("ClientReferencePersonsTitle", _objTrainings.ClientReferencePersonsTitle), ParamBuilder.Par("ClientReferencePersonsPhone", _objTrainings.ClientReferencePersonsPhone), ParamBuilder.Par("ClientReferencePersonsEmail", _objTrainings.ClientReferencePersonsEmail), ParamBuilder.Par("UpdatedBy", _objTrainings.UpdatedBy), ParamBuilder.Par("UpdatedDate", _objTrainings.UpdatedDate))); }
/// <summary> /// Persons the education trainings create dal. /// </summary> /// <param name="_objTrainings">The object trainings.</param> /// <returns>System.Int64.</returns> public long PersonEducationTrainings_CreateDAL(PersonTrainings _objTrainings) { var parameters = new[] { ParamBuilder.Par("ID", 0) }; return(ExecuteInt64withOutPutparameterSp("TMS_PersonEducationTrainings_Create", parameters, ParamBuilder.Par("PersonID", _objTrainings.PersonID), ParamBuilder.Par("TrainingP_Title", _objTrainings.TrainingP_Title), ParamBuilder.Par("TrainingS_Title", _objTrainings.TrainingS_Title), ParamBuilder.Par("TrainingType", _objTrainings.TrainingType), ParamBuilder.Par("DurationType", _objTrainings.DurationType), ParamBuilder.Par("CourseDuration", _objTrainings.CourseDuration), ParamBuilder.Par("CourseOutline", _objTrainings.CourseOutline), ParamBuilder.Par("LearningObjective", _objTrainings.LearningObjective), ParamBuilder.Par("ClientName", _objTrainings.ClientName), ParamBuilder.Par("ClientReferencePersonsName", _objTrainings.ClientReferencePersonsName), ParamBuilder.Par("ClientReferencePersonsTitle", _objTrainings.ClientReferencePersonsTitle), ParamBuilder.Par("ClientReferencePersonsPhone", _objTrainings.ClientReferencePersonsPhone), ParamBuilder.Par("ClientReferencePersonsEmail", _objTrainings.ClientReferencePersonsEmail), ParamBuilder.Par("CreatedBy", _objTrainings.CreatedBy), ParamBuilder.Par("CreatedDate", _objTrainings.CreatedDate))); }
public ActionResult PersonTrainingDelivered_Destroy([DataSourceRequest] DataSourceRequest request, PersonTrainings _personTrainingDelivered) { if (ModelState.IsValid) { _personTrainingDelivered.UpdatedBy = CurrentUser.NameIdentifierInt64; _personTrainingDelivered.UpdatedDate = DateTime.Now; _personTrainingDelivered.TrainingType = TrainingType.TrainingType_Existing; var result = _PersonEducationBAL.PersonEducationTrainings_DeleteBAL(_personTrainingDelivered); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } var resultData = new[] { _personTrainingDelivered }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public ActionResult PersonTrainingDelivered_Create([DataSourceRequest] DataSourceRequest request, string pid, PersonTrainings _personTrainingDelivered) { if (ModelState.IsValid) { _personTrainingDelivered.CreatedBy = CurrentUser.NameIdentifierInt64; _personTrainingDelivered.CreatedDate = DateTime.Now; _personTrainingDelivered.PersonID = Convert.ToInt64(pid); _personTrainingDelivered.TrainingType = TrainingType.TrainingType_Existing; var result = _PersonEducationBAL.PersonEducationTrainings_CreateBAL(_personTrainingDelivered); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.PersonEducationCertificationsDuplicationMessage); } else { _personTrainingDelivered.ID = result; } } var resultData = new[] { _personTrainingDelivered }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
public ActionResult PersonTrainingDelivered_Update([DataSourceRequest] DataSourceRequest request, PersonTrainings _personTrainingDelivered) { if (ModelState.IsValid) { var _person = _PersonEducationBAL.PersonEducationTrainings_GetAllByPersonIDBAL(_personTrainingDelivered.PersonID.ToString(), (int)TrainingType.TrainingType_Existing); var _personExist = _person.Where(x => x.TrainingP_Title == _personTrainingDelivered.TrainingP_Title).ToList(); if (_personExist.Count > 1) { ModelState.AddModelError(lr.TrainingTitleAllreadyExists, lr.TrainingTitleAllreadyExists); } else { if (_personExist.Count <= 1) { var _personTrainingTitle = _personExist.Where(x => x.ID == _personTrainingDelivered.ID).ToList(); if (_personTrainingTitle.Count == 1 || _personTrainingTitle.Count == 0) { _personTrainingDelivered.UpdatedBy = CurrentUser.NameIdentifierInt64; _personTrainingDelivered.UpdatedDate = DateTime.Now; _personTrainingDelivered.TrainingType = TrainingType.TrainingType_Existing; var result = _PersonEducationBAL.PersonEducationTrainings_UpdateBAL(_personTrainingDelivered); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } else { ModelState.AddModelError(lr.TrainingTitleAllreadyExists, lr.TrainingTitleAllreadyExists); } } } } var resultData = new[] { _personTrainingDelivered }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public ActionResult PersonTrainingDelivered_Create([DataSourceRequest] DataSourceRequest request, string pid, PersonTrainings _personTrainingDelivered) { if (ModelState.IsValid) { var _person = _PersonEducationBAL.PersonEducationTrainings_GetAllByPersonIDBAL(pid, (int)TrainingType.TrainingType_Existing); var _personExist = _person.Where(x => x.TrainingP_Title == _personTrainingDelivered.TrainingP_Title).ToList(); if (_personExist.Count > 0) { ModelState.AddModelError(lr.TrainingTitleAllreadyExists, lr.TrainingTitleAllreadyExists); } else { _personTrainingDelivered.CreatedBy = CurrentUser.NameIdentifierInt64; _personTrainingDelivered.CreatedDate = DateTime.Now; _personTrainingDelivered.PersonID = Convert.ToInt64(pid); _personTrainingDelivered.TrainingType = TrainingType.TrainingType_Existing; var result = _PersonEducationBAL.PersonEducationTrainings_CreateBAL(_personTrainingDelivered); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.PersonEducationCertificationsDuplicationMessage); } else { _personTrainingDelivered.ID = result; } } } var resultData = new[] { _personTrainingDelivered }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
/// <summary> /// Persons the education trainings delete bal. /// </summary> /// <param name="_objEducation">The object education.</param> /// <returns>System.Int32.</returns> public int PersonEducationTrainings_DeleteBAL(PersonTrainings _objEducation) { return(DAL.PersonEducationTrainings_DeleteDAL(_objEducation)); }
//certifications //Trainings /// <summary> /// Persons the education trainings create bal. /// </summary> /// <param name="_objEducation">The object education.</param> /// <returns>System.Int64.</returns> public long PersonEducationTrainings_CreateBAL(PersonTrainings _objEducation) { return(DAL.PersonEducationTrainings_CreateDAL(_objEducation)); }