public static List <FullGraduateDto> sendingCandidateToContact(string massege, List <CoordinatingJobsForGraduatesDto> coordinatings, int userId, string byEmail, string password, string fldCVPath) { List <FullGraduateDto> graduates = GraduateManager.GraduateListById( coordinatings.Select(c => c.candidateId).ToList()); List <string> detailes = JobManager.get0TitleAnd1ContactMailOfJobById(coordinatings[0].jobId); MailManager mail = new MailManager(byEmail, password, fldCVPath); graduates = mail.sendCVCandidateToContact(detailes[0], massege, graduates, detailes[1], userId); coordinatings.RemoveAll(c => graduates.Any(g => g.Id == c.candidateId)); JobsCoordinationManager.JobsCoordinationUpdate( coordinatings.Select(c => c.Id).ToList() , 3); //send CV JobManager.JobUpdate(coordinatings[0].jobId, true); return(graduates); }
public ImportRes execut(Dictionary <string, string> keyValues,//Dictionary<key -name of field, value - char of column> Stream fileStream, int rowStart, int rowEnd /*include*/) { WorkBook workbook = WorkBook.Load(fileStream); WorkSheet sheet = workbook.WorkSheets[0]; List <int> errLine = new List <int>(); FullGraduateDto graduateDto; List <FullGraduateDto> fullGraduateDtos = new List <FullGraduateDto>(); for (int i = rowStart; i <= rowEnd; i++) { graduateDto = new FullGraduateDto(); try { foreach (var item in keyValues) { switch (item.Key) { case "City": graduateDto.City = new CityDto(); graduateDto.City.Id = findCItyIdByName(sheet[item.Value + i].Value.ToString()); break; case "Branch": graduateDto.Branch = new BranchDto(); graduateDto.Branch.Id = int.Parse(item.Value); break; case "Expertise": graduateDto.Expertise = new ExpertiseDto(); graduateDto.Expertise.Id = int.Parse(item.Value); break; case "gender": graduateDto.gender = item.Value; break; case "didGraduate": graduateDto.didGraduate = bool.Parse(item.Value); break; case "hasDiploma": case "isWorkerInProfession": case "placedByThePlacementDepartment": case "hasExperience": graduateDto.GetType().GetProperty(item.Key).SetValue( graduateDto, convertHEBoolToBool(sheet[item.Value + i].Value.ToString()) ); break; case "phone": graduateDto.phone = sheet[item.Value + i].Value.ToString().Replace("-", ""); break; default: graduateDto.GetType().GetProperty(item.Key).SetValue( graduateDto, Convert.ChangeType( sheet[item.Value + i].Value, graduateDto.GetType().GetProperty(item.Key).PropertyType ) ); break; } } graduateDto.isActive = false; GraduateManager.NewGraduate(graduateDto); fullGraduateDtos.Add(graduateDto); } catch (Exception) { errLine.Add(i); } } return(new ImportRes() { errLine = errLine, readLine = fullGraduateDtos }); }
public static void GraduateDtoUploudFile(string graduateId, string filePath) { GraduateManager.GraduateUploudFile(graduateId, filePath); }
public static void DeleteGraduateDto(string id) { GraduateManager.DeleteGraduate(id); }
public static void GraduateDtoEditing(FullGraduateDto graduateDto) { GraduateManager.GraduateEditing(graduateDto); }
public static void GraduateDtoEditingtrue(string id, bool isint) { GraduateManager.GraduateEditingtrue(id, isint); }
public static FullGraduateDto NewGraduateDto(FullGraduateDto graduateDto, int userId) { return(GraduateManager.NewGraduate(graduateDto)); }
public static List <FullGraduateDto> GraduateDtoForJob(int idSubject, int idJob) { return(GraduateManager.GraduateForJob(idSubject, idJob)); }
public static FullGraduateDto GraduateDtoById(string Id) { return(GraduateManager.GraduateById(Id)); }
public static List <MainGraduateDto> GraduateDtoList() { return(GraduateManager.GraduateList()); }
public static ApiRes <MainGraduateDto> GraduateDtoLazyList(GraduateFilters filters, string sort, int page, int size) { return(GraduateManager.GraduateLazyList(filters, sort, page, size)); }