コード例 #1
0
        private void AddJobInterviewerInfo(List <JobInterviewerInfo> value, int VacancyID, ref MySql.Data.MySqlClient.MySqlConnection con, ref MySql.Data.MySqlClient.MySqlTransaction MyTran)
        {
            string conStr = configuration.GetSection("Data").GetSection("ConntectionString").Value;



            try
            {
                //Add Work History, Employee Profile
                RTS.JobStation.Controller.JobInterviewer JobInterviewerController = new RTS.JobStation.Controller.JobInterviewer();
                RTS.JobStation.Models.JobInterviewer     JobInterviewerModel      = new RTS.JobStation.Models.JobInterviewer();
                foreach (var Interviewer in value)
                {
                    JobInterviewerModel.VacancyID         = VacancyID;
                    JobInterviewerModel.InterviewerUserID = Interviewer.InterviewerUserID;
                    JobInterviewerModel.isEvaluator       = Interviewer.isEvaluator;
                    JobInterviewerModel.isMandatory       = Interviewer.isMandatory;
                    JobInterviewerModel.UpdatedBy         = Request.Headers["userid"];
                    JobInterviewerModel.UpdatedOn         = DateTime.Now;
                    JobInterviewerController.Insert(JobInterviewerModel, ref con, ref MyTran);
                }


                //Add Education History, Education Profile
                RTS.JobStation.Controller.Educationhistory EducationHistoryController = new RTS.JobStation.Controller.Educationhistory();
                RTS.JobStation.Models.Educationhistory     EducationHistoryModel      = new RTS.JobStation.Models.Educationhistory();
            }
            catch
            {
            }
        }
コード例 #2
0
        private void CreateCandidateProfile(CandidateCVInfo value, int CandidateID)
        {
            string conStr = configuration.GetSection("Data").GetSection("ConntectionString").Value;

            MySql.Data.MySqlClient.MySqlConnection  con    = null;
            MySql.Data.MySqlClient.MySqlTransaction MyTran = null;

            try
            {
                con    = RTS.JobStation.DatabaseCommands.OpenConnection();
                MyTran = RTS.JobStation.DatabaseCommands.OpenTransaction(ref con);

                //Add Work History, Employee Profile
                RTS.JobStation.Controller.Workhistory EmployeeProfileController = new RTS.JobStation.Controller.Workhistory();
                RTS.JobStation.Models.Workhistory     EmployeeProfileModel      = new RTS.JobStation.Models.Workhistory();
                foreach (var WorkHistory in value.EmployeeProfile)
                {
                    EmployeeProfileModel.CandidateID        = CandidateID;
                    EmployeeProfileModel.CountryID          = WorkHistory.CountryID;
                    EmployeeProfileModel.Description        = WorkHistory.Description;
                    EmployeeProfileModel.Designation        = WorkHistory.Designation;
                    EmployeeProfileModel.Employer           = WorkHistory.Employer;
                    EmployeeProfileModel.GrossMonthlySalary = WorkHistory.GrossMonthlySalary;
                    EmployeeProfileModel.isLatestJob        = WorkHistory.isLatestJob;
                    EmployeeProfileModel.ReasonForLeaving   = WorkHistory.ReasonForLeaving;
                    EmployeeProfileModel.ReportingTo        = WorkHistory.ReportingTo;
                    EmployeeProfileModel.ToDate             = WorkHistory.ToDate;
                    EmployeeProfileModel.FromDate           = WorkHistory.FromDate;
                    EmployeeProfileModel.UpdatedBy          = Request.Headers["userid"];
                    EmployeeProfileModel.UpdatedOn          = DateTime.Now;
                    EmployeeProfileController.Insert(EmployeeProfileModel, ref con, ref MyTran);
                }


                //Add Education History, Education Profile
                RTS.JobStation.Controller.Educationhistory EducationHistoryController = new RTS.JobStation.Controller.Educationhistory();
                RTS.JobStation.Models.Educationhistory     EducationHistoryModel      = new RTS.JobStation.Models.Educationhistory();

                foreach (var EducationHistory in value.EducationProfile)
                {
                    EducationHistoryModel.CandidateID              = CandidateID;
                    EducationHistoryModel.CompletionYear           = EducationHistory.CompletionYear;
                    EducationHistoryModel.CountryID                = EducationHistory.CountryID;
                    EducationHistoryModel.Description              = EducationHistory.Description;
                    EducationHistoryModel.EducationQualificationID = EducationHistory.EducationQualificationID;
                    EducationHistoryModel.ExamResult               = EducationHistory.ExamResult;
                    EducationHistoryModel.Institute                = EducationHistory.Institute;
                    EducationHistoryModel.UpdatedBy                = Request.Headers["userid"];
                    EducationHistoryModel.UpdatedOn                = DateTime.Now;

                    EducationHistoryController.Insert(EducationHistoryModel, ref con, ref MyTran);
                }

                //Add Preffered Location
                RTS.JobStation.Controller.Candidateprefferedlocation CandidatePrefferedLocationController = new RTS.JobStation.Controller.Candidateprefferedlocation();
                RTS.JobStation.Models.Candidateprefferedlocation     CandidatePrefferedLocationModel      = new RTS.JobStation.Models.Candidateprefferedlocation();
                foreach (var Location in value.PrefferedLocation)
                {
                    CandidatePrefferedLocationModel.CandidateID = CandidateID;
                    CandidatePrefferedLocationModel.LocationID  = Location.LocationID;
                    CandidatePrefferedLocationModel.UpdatedBy   = Request.Headers["userid"];
                    CandidatePrefferedLocationModel.UpdatedOn   = DateTime.Now;
                    CandidatePrefferedLocationController.Insert(CandidatePrefferedLocationModel, ref con, ref MyTran);
                }


                //Add Job Industry
                RTS.JobStation.Controller.Candidatejobindustry CandidatejobindustryController = new RTS.JobStation.Controller.Candidatejobindustry();
                RTS.JobStation.Models.Candidatejobindustry     CandidatejobindustryModel      = new RTS.JobStation.Models.Candidatejobindustry();
                foreach (var Industry in value.JobIndustry)
                {
                    CandidatejobindustryModel.CandidateID = CandidateID;
                    CandidatejobindustryModel.IndustryID  = Industry.IndustryID;
                    CandidatejobindustryModel.UpdatedBy   = Request.Headers["userid"];
                    CandidatejobindustryModel.UpdatedOn   = DateTime.Now;
                    CandidatejobindustryController.Insert(CandidatejobindustryModel, ref con, ref MyTran);
                }
            }
            catch
            {
            }
            finally
            {
                RTS.JobStation.DatabaseCommands.CloseTransaction(ref MyTran);
                RTS.JobStation.DatabaseCommands.CloseConnection(ref con);
            };
        }