public ActionResult End(AssigningsViewModel AssigningVM) { BaseAssigningsBLL assigning = new BaseAssigningsBLL(); assigning.AssigningID = AssigningVM.AssigningID; assigning.LoginIdentity = UserIdentity; Result result = assigning.BreakLastAssigning(AssigningVM.EmployeeCodeID, DateTime.Now, (AssigningsReasonsEnum)AssigningVM.EndAssigningReasonID, assigning.Notes); if (result.EnumMember == OrganizationStructureValidationEnum.RejectedBecauseOfPlacementPeriodFinished.ToString()) { throw new CustomException(Resources.Globalization.EmployeesPlacementPeriodFinishedText); } return(View(AssigningVM)); }
public HttpResponseMessage EndingEmployeeAssigning(AssigningsViewModel AssigningVM) { BaseAssigningsBLL assigning = (InternalAssigningBLL)AssigingsFactory.CreateAssigning(AssigningsTypesEnum.Internal); assigning.AssigningID = AssigningVM.AssigningID; assigning.LoginIdentity = WindowsEmployeeCode; //assigning.EmployeeCareerHistory = new EmployeesCareersHistoryBLL() { EmployeeCode = new EmployeesCodesBLL() { emplo } } //assigning.AssigningEndDate = DateTime.Now; //assigning.AssigningEndReason = new AssigningsReasonsBLL() { AssigningReasonID = AssigningVM.EndAssigningReasonID }; //assigning.Notes = AssigningVM.Notes; Result result = assigning.BreakLastAssigning(AssigningVM.EmployeeCodeID, DateTime.Now, (AssigningsReasonsEnum)AssigningVM.EndAssigningReasonID, assigning.Notes); if (result.EnumMember == OrganizationStructureValidationEnum.RejectedBecauseOfPlacementPeriodFinished.ToString()) { throw new CustomException(Resources.Globalization.EmployeesPlacementPeriodFinishedText); } else { return(new HttpResponseMessage(HttpStatusCode.OK)); } }