示例#1
0
        /// <summary>
        /// 面談資本資料的Sheet
        /// </summary>
        /// <param name="interviewInfo">面談基本資訊</param>
        /// <param name="sheet"></param>
        /// <returns></returns>
        private Worksheet CreateInterviewInfoSheet(InterviewInfo interviewInfo, Worksheet sheet)
        {
            int row = 0; ////紀錄目前在哪一行

            ////照片
            if (!string.IsNullOrEmpty(interviewInfo.Image))
            {
                string       picPath = interviewInfo.Image;
                ExcelPicture picture = sheet.Pictures.Add(2, 2, picPath);
                picture.Height = 135;
                picture.Width  = 145;
            }

            ////面談基本資料
            sheet.Range["F2"].Text  = interviewInfo.Vacancies;
            sheet.Range["F4"].Text  = interviewInfo.Name;
            sheet.Range["F6"].Text  = interviewInfo.Married;
            sheet.Range["F8"].Text  = interviewInfo.Adress;
            sheet.Range["F10"].Text = interviewInfo.Urgent_Contact_Person;
            sheet.Range["I2"].Text  = interviewInfo.Interview_Date;
            sheet.Range["I4"].Text  = interviewInfo.Sex;
            sheet.Range["I6"].Text  = interviewInfo.Mail;
            sheet.Range["I10"].Text = interviewInfo.Urgent_Relationship;
            sheet.Range["L4"].Text  = string.IsNullOrEmpty(interviewInfo.Birthday) ? string.Empty : interviewInfo.Birthday;
            sheet.Range["L6"].Text  = interviewInfo.CellPhone;
            sheet.Range["L10"].Text = interviewInfo.Urgent_CellPhone;
            ////學歷
            List <Education> educationList = new List <Education>();

            if (!string.IsNullOrEmpty(interviewInfo.Education))
            {
                educationList = interviewInfo.Education.FromJson <List <Education> >();
            }

            row = 12;
            for (int i = 0; i < educationList.Count; i++)
            {
                row++;
                sheet.Range[row, 4].Text = string.IsNullOrEmpty(educationList[i].School) ? string.Empty : educationList[i].School;
                sheet.Range[row, 5].Text = string.IsNullOrEmpty(educationList[i].Department) ? string.Empty : educationList[i].Department;
                sheet.Range[row, 6].Text = string.IsNullOrEmpty(educationList[i].Start_End_Date) ? string.Empty : educationList[i].Start_End_Date;
                sheet.Range[row, 7].Text = string.IsNullOrEmpty(educationList[i].Is_Graduation) ? string.Empty : educationList[i].Is_Graduation;
                sheet.Range[row, 8].Text = string.IsNullOrEmpty(educationList[i].Remark) ? string.Empty : educationList[i].Remark;
                sheet.Range["H" + row + ":M" + row].Merge();
                sheet.Range["D" + row + ":H" + row].Style.HorizontalAlignment = HorizontalAlignType.Left;
            }
            sheet.Range["D12:M" + row].BorderAround(LineStyleType.Medium);
            sheet.Range["D12:M" + row].BorderInside(LineStyleType.Thin);
            /////工作經驗
            List <WorkExperience> workExperienceList = new List <WorkExperience>();

            if (!string.IsNullOrEmpty(interviewInfo.Work_Experience))
            {
                workExperienceList = interviewInfo.Work_Experience.FromJson <List <WorkExperience> >();
            }

            row += 2;
            sheet.Range[row, 3].Text = "經歷";
            sheet.Range[row, 4].Text = "機構名稱";
            sheet.Range[row, 5].Text = "職稱";
            sheet.Range[row, 6].Text = "起迄年月";
            sheet.Range[row, 7].Text = "到職薪資";
            sheet.Range[row, 8].Text = "離職薪資";
            sheet.Range[row, 9].Text = "離職原因";
            sheet.Range["I" + row + ":M" + row].Merge();
            sheet.Range["D" + row + ":I" + row].Style.HorizontalAlignment = HorizontalAlignType.Center;

            for (int i = 0; i < workExperienceList.Count; i++)
            {
                row++;
                sheet.Range[row, 4].Text = string.IsNullOrEmpty(workExperienceList[i].Institution_name) ? string.Empty : workExperienceList[i].Institution_name;
                sheet.Range[row, 5].Text = string.IsNullOrEmpty(workExperienceList[i].Position) ? string.Empty : workExperienceList[i].Position;
                sheet.Range[row, 6].Text = string.IsNullOrEmpty(workExperienceList[i].Start_End_Date) ? string.Empty : workExperienceList[i].Start_End_Date;
                sheet.Range[row, 7].Text = string.IsNullOrEmpty(workExperienceList[i].Start_Salary) ? string.Empty : workExperienceList[i].Start_Salary;
                sheet.Range[row, 8].Text = string.IsNullOrEmpty(workExperienceList[i].End_Salary) ? string.Empty : workExperienceList[i].End_Salary;
                sheet.Range[row, 9].Text = string.IsNullOrEmpty(workExperienceList[i].Leaving_Reason) ? string.Empty : workExperienceList[i].Leaving_Reason;
                sheet.Range["I" + row + ":M" + row].Merge();
                sheet.Range["D" + row + ":M" + row].Style.HorizontalAlignment = HorizontalAlignType.Left;
                sheet.Range["G" + row + ":H" + row].Style.HorizontalAlignment = HorizontalAlignType.Right;
            }
            sheet.Range["D" + (row - workExperienceList.Count) + ":M" + row].BorderAround(LineStyleType.Medium);
            sheet.Range["D" + (row - workExperienceList.Count) + ":M" + row].BorderInside(LineStyleType.Thin);
            ////兵役
            row += 2;
            sheet.Range[row, 3].Text = "兵役";
            sheet.Range[row, 4].Text = "服役期間";
            sheet.Range[row, 5].Text = "免役說明";
            sheet.Range["E" + row + ":M" + row].Merge();
            sheet.Range["D" + row + ":E" + row].Style.HorizontalAlignment = HorizontalAlignType.Center;
            row++;
            sheet.Range[row, 4].Text = interviewInfo.During_Service;
            sheet.Range[row, 5].Text = interviewInfo.Exemption_Reason;
            sheet.Range["E" + row + ":M" + row].Merge();
            sheet.Range["D" + row + ":M" + row].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["D" + (row - 1) + ":M" + row].BorderAround(LineStyleType.Medium);
            sheet.Range["D" + (row - 1) + ":M" + row].BorderInside(LineStyleType.Thin);
            ////專長
            row += 2;
            sheet.Range[row, 3].Text = "專長";
            sheet.Range[row, 4].Text = "※請盡可能寫出您所具備的專長及與工作有關的技能";
            sheet.Range["D" + row + ":G" + row].Merge();
            sheet.Range["D" + row + ":G" + row].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            ////----程式語言
            sheet.Range[row, 4].Text = "程式語言";
            string[] Expertise_Language = { "C/C++", "Java", "C#", "VB", "Scala", "R", "Python" };
            for (int i = 5; i <= 11; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_Language[i - 5];
            }

            sheet.Range[row, 12].Text = "其他";
            sheet.Range["M" + row + ":O" + row].Merge();
            sheet.Range["M" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 13].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_Language, sheet, row, Expertise_Language, 13);
            ////----開發工具
            row += 2;
            sheet.Range[row, 4].Text = "開發工具";
            string[] Expertise_Tools = { "Visual Studio", "Eclipse", "Xcode" };
            for (int i = 5; i <= 7; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_Tools[i - 5];
            }

            sheet.Range[row, 8].Text = "Framwork";
            sheet.Range["I" + row + ":J" + row].Merge();
            sheet.Range["I" + row + ":J" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 9].Text = interviewInfo.Expertise_Tools_Framwork ?? string.Empty;
            sheet.Range[row, 9].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 11].Text = "其他";
            sheet.Range["L" + row + ":O" + row].Merge();
            sheet.Range["L" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 12].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_Tools, sheet, row, Expertise_Tools, 12);
            ////----Devops
            row += 2;
            sheet.Range[row, 4].Text = "Devops";
            string[] Expertise_Devops = { "Docker", "Git", "Vagrant", "Puppet", "TFS" };
            for (int i = 5; i <= 9; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_Devops[i - 5];
            }

            sheet.Range[row, 10].Text = "其他";
            sheet.Range["K" + row + ":O" + row].Merge();
            sheet.Range["K" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 11].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_Devops, sheet, row, Expertise_Devops, 11);
            ////----作業系統
            row += 2;
            sheet.Range[row, 4].Text = "作業系統";
            string[] Expertise_OS = { "Windows", "Linux", "Unix", "Android", "IOS" };
            for (int i = 5; i <= 9; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_OS[i - 5];
            }

            sheet.Range[row, 10].Text = "其他";
            sheet.Range["K" + row + ":O" + row].Merge();
            sheet.Range["K" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 11].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_OS, sheet, row, Expertise_OS, 11);
            ////----大數據
            row += 2;
            sheet.Range[row, 4].Text = "大數據";
            string[] Expertise_BigData = { "Hadoop", "Spark", "Cloudera" };
            for (int i = 5; i <= 7; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_BigData[i - 5];
            }

            sheet.Range[row, 8].Text = "其他";
            sheet.Range["I" + row + ":O" + row].Merge();
            sheet.Range["I" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 9].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_BigData, sheet, row, Expertise_BigData, 9);
            ////----資料庫
            row += 2;
            sheet.Range[row, 4].Text = "資料庫";
            string[] Expertise_DataBase = { "Oracle", "My SQL", "MS SQL", "Hbase" };
            for (int i = 5; i <= 8; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_DataBase[i - 5];
            }

            sheet.Range[row, 9].Text = "其他";
            sheet.Range["J" + row + ":O" + row].Merge();
            sheet.Range["J" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 10].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_DataBase, sheet, row, Expertise_DataBase, 10);
            ////----專業認證
            row += 2;
            sheet.Range[row, 4].Text = "專業認證";
            string[] Expertise_Certification = { "SCJP", "SCWCD", "MCAD", "MCTS", "PMP" };
            for (int i = 5; i <= 9; i++)
            {
                sheet.Range[row, i].Text = "□" + Expertise_Certification[i - 5];
            }

            sheet.Range[row, 10].Text = "其他";
            sheet.Range["K" + row + ":O" + row].Merge();
            sheet.Range["K" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 11].Style.HorizontalAlignment = HorizontalAlignType.Left;
            ChcekedExpertise(interviewInfo.Expertise_Certification, sheet, row, Expertise_Certification, 11);
            /////語言能力
            List <Language> languageList = new List <Language>();

            if (!string.IsNullOrEmpty(interviewInfo.Language))
            {
                languageList = interviewInfo.Language.FromJson <List <Language> >();
            }

            row += 2;
            sheet.Range[row, 3].Text = "語言能力";
            sheet.Range[row, 4].Text = "語言";
            sheet.Range[row, 5].Text = "聽";
            sheet.Range[row, 6].Text = "說";
            sheet.Range[row, 7].Text = "讀";
            sheet.Range[row, 8].Text = "寫";
            sheet.Range["D" + row + ":H" + row].Style.HorizontalAlignment = HorizontalAlignType.Center;

            for (int i = 0; i < languageList.Count; i++)
            {
                row++;
                sheet.Range[row, 4].Text = string.IsNullOrEmpty(languageList[i].Language_Name) ? string.Empty : languageList[i].Language_Name;
                sheet.Range[row, 5].Text = string.IsNullOrEmpty(languageList[i].Listen) ? string.Empty : languageList[i].Listen;
                sheet.Range[row, 6].Text = string.IsNullOrEmpty(languageList[i].Speak) ? string.Empty : languageList[i].Speak;
                sheet.Range[row, 7].Text = string.IsNullOrEmpty(languageList[i].Read) ? string.Empty : languageList[i].Read;
                sheet.Range[row, 8].Text = string.IsNullOrEmpty(languageList[i].Write) ? string.Empty : languageList[i].Write;
                sheet.Range["D" + row + ":H" + row].Style.HorizontalAlignment = HorizontalAlignType.Center;
            }
            sheet.Range["D" + (row - languageList.Count) + ":H" + row].BorderAround(LineStyleType.Medium);
            sheet.Range["D" + (row - languageList.Count) + ":H" + row].BorderInside(LineStyleType.Thin);
            ////問題
            row += 2;
            sheet.Range[row, 3].Text = "最近三年內,是否有計畫繼續就學或出國深造?";
            sheet.Range["C" + row + ":F" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            sheet.Range["C" + row + ":O" + row].Merge();
            sheet.Range["C" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 3].Text = interviewInfo.IsStudy;
            row += 2;
            sheet.Range[row, 3].Text = "有無親友在本公司服務?";
            sheet.Range["C" + row + ":E" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["F" + row + ":G" + row].Merge();
            sheet.Range["F" + row + ":G" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 6].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 6].Text = interviewInfo.IsService;
            sheet.Range[row, 9].Text = "關係";
            sheet.Range[row, 9].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["J" + row + ":K" + row].Merge();
            sheet.Range["J" + row + ":K" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 10].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 10].Text = interviewInfo.Relatives_Relationship;
            sheet.Range[row, 13].Text = "姓名";
            sheet.Range[row, 13].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["N" + row + ":O" + row].Merge();
            sheet.Range["N" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 14].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 14].Text = interviewInfo.Relatives_Name;
            row += 2;
            sheet.Range[row, 3].Text = "在工作中您最在乎什麼?";
            sheet.Range["C" + row + ":E" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["F" + row + ":G" + row].Merge();
            sheet.Range["F" + row + ":G" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 6].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 6].Text = interviewInfo.Care_Work;
            sheet.Range[row, 9].Text = "希望待遇";
            sheet.Range[row, 9].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["J" + row + ":K" + row].Merge();
            sheet.Range["J" + row + ":K" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 10].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 10].Text = interviewInfo.Hope_Salary;
            sheet.Range[row, 13].Text = "通知後多久可報到?";
            sheet.Range[row, 13].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["N" + row + ":O" + row].Merge();
            sheet.Range["N" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 14].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 14].Text = interviewInfo.When_Report;
            row += 2;
            sheet.Range[row, 3].Text = "優點";
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["D" + row + ":G" + row].Merge();
            sheet.Range["D" + row + ":G" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 4].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 4].Text = interviewInfo.Advantage;
            sheet.Range[row, 9].Text = "缺點";
            sheet.Range[row, 9].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["J" + row + ":O" + row].Merge();
            sheet.Range["J" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 10].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 10].Text = interviewInfo.Disadvantages;
            row += 2;
            sheet.Range[row, 3].Text = "嗜好";
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range["D" + row + ":G" + row].Merge();
            sheet.Range["D" + row + ":G" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 4].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 4].Text = interviewInfo.Hobby;
            row += 2;
            sheet.Range[row, 3].Text = "什麼原因吸引您來亦思應徵此工作? 您對亦思的第一印象是什麼?";
            sheet.Range["C" + row + ":G" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            sheet.Range["C" + row + ":O" + row].Merge();
            sheet.Range["C" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 3].Text = interviewInfo.Attract_Reason;
            row += 2;
            sheet.Range[row, 3].Text = "請描述您對未來的目標、希望。";
            sheet.Range["C" + row + ":E" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            sheet.Range["C" + row + ":O" + row].Merge();
            sheet.Range["C" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 3].Text = interviewInfo.Future_Goal;
            row += 2;
            sheet.Range[row, 3].Text = "您心目中的理想主管是什麼樣的人?";
            sheet.Range["C" + row + ":E" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            sheet.Range["C" + row + ":O" + row].Merge();
            sheet.Range["C" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 3].Text = interviewInfo.Hope_Supervisor;
            row += 2;
            sheet.Range[row, 3].Text = "您希望亦思給與您什麼承諾?(任何方面)";
            sheet.Range["C" + row + ":E" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            sheet.Range["C" + row + ":O" + row].Merge();
            sheet.Range["C" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 3].Text = interviewInfo.Hope_Promise;
            row += 2;
            sheet.Range[row, 3].Text = "覺得自己的哪個特質最強烈? 現在您有三十秒的自我推薦時間,您會透過什麼方式讓我們對您印象深刻?";
            sheet.Range["C" + row + ":K" + row].Merge();
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            row++;
            sheet.Range["C" + row + ":O" + row].Merge();
            sheet.Range["C" + row + ":O" + row].Style.Borders[BordersLineType.EdgeBottom].LineStyle = LineStyleType.Double;
            sheet.Range[row, 3].Style.HorizontalAlignment = HorizontalAlignType.Left;
            sheet.Range[row, 3].Text = interviewInfo.Introduction;
            return(sheet);
        }
示例#2
0
        /// <summary>
        /// 讀取面談基本資料的Sheet
        /// </summary>
        /// <param name="sheet"></param>
        /// <returns></returns>
        private DataTable ReadInterviewInfoSheet(Worksheet sheet)
        {
            int       row = 0; ////紀錄目前在哪一行
            DataTable dt  = new DataTable();

            if (sheet.Range["E2"].Value.Trim() != "應徵職缺")
            {
                throw new Exception("面談結果sheet格式不符合");
            }

            InterviewInfo interviewInfo = new InterviewInfo
            {
                Vacancies             = sheet.Range["F2"].Value.Trim(),
                Name                  = sheet.Range["F4"].Value.Trim(),
                Married               = sheet.Range["F6"].Value.Trim(),
                Adress                = sheet.Range["F8"].Value.Trim(),
                Urgent_Contact_Person = sheet.Range["F10"].Value.Trim(),
                Interview_Date        = sheet.Range["I2"].Value.Trim(),
                Sex  = sheet.Range["I4"].Value.Trim(),
                Mail = sheet.Range["I6"].Value.Trim(),
                Urgent_Relationship = sheet.Range["I10"].Value.Trim(),
                Birthday            = sheet.Range["L4"].Value.Trim(),
                CellPhone           = sheet.Range["L6"].Value.Trim(),
                Urgent_CellPhone    = sheet.Range["L10"].Value.Trim(),
            };

            ////處理圖片
            if (sheet.Pictures.Count > 0)
            {
                ExcelPicture picture  = sheet.Pictures[0];
                string       tempPath = Path.GetTempFileName();
                picture.Picture.Save(tempPath, ImageFormat.Png);
                interviewInfo.Image = tempPath;
                //picture.Picture.Save(@"..\..\..\Template\image.png", ImageFormat.Png);
            }

            row = 13;
            ////教育程度
            List <Education> educationList = new List <Education>();

            while (sheet.Range["C" + row].Value.Trim() != "經歷")
            {
                Education education = new Education
                {
                    School         = sheet.Range["D" + row].Value.Trim(),
                    Department     = sheet.Range["E" + row].Value.Trim(),
                    Start_End_Date = sheet.Range["F" + row].Value.Trim(),
                    Is_Graduation  = sheet.Range["G" + row].Value.Trim(),
                    Remark         = sheet.Range["H" + row].Value.Trim(),
                };

                if (!education.TResultIsEmtpty())
                {
                    educationList.Add(education);
                }

                row++;
            }
            interviewInfo.Education = JsonConvert.SerializeObject(educationList, Formatting.Indented);
            interviewInfo.Education = interviewInfo.Education == "[]" ? string.Empty : interviewInfo.Education;

            row++;
            ////工作經驗
            List <WorkExperience> workExperienceList = new List <WorkExperience>();

            while (sheet.Range["C" + row].Value.Trim() != "兵役")
            {
                WorkExperience workExperience = new WorkExperience
                {
                    Institution_name = sheet.Range["D" + row].Value.Trim(),
                    Position         = sheet.Range["E" + row].Value.Trim(),
                    Start_End_Date   = sheet.Range["F" + row].Value.Trim(),
                    Start_Salary     = sheet.Range["G" + row].Value.Trim(),
                    End_Salary       = sheet.Range["H" + row].Value.Trim(),
                    Leaving_Reason   = sheet.Range["I" + row].Value.Trim(),
                };

                if (!workExperience.TResultIsEmtpty())
                {
                    workExperienceList.Add(workExperience);
                }
                row++;
            }
            interviewInfo.Work_Experience = JsonConvert.SerializeObject(workExperienceList, Formatting.Indented);
            interviewInfo.Work_Experience = interviewInfo.Work_Experience == "[]" ? string.Empty : interviewInfo.Work_Experience;

            ////兵役
            row++;
            interviewInfo.IsService        = sheet.Range["D" + row].Value.Trim();
            interviewInfo.Exemption_Reason = sheet.Range["E" + row].Value.Trim();
            row += 3;
            ////專長
            ////專長-程式語言
            interviewInfo.Expertise_Language = GetExpertise(sheet, row, 11, 13);
            row += 2;
            ////專長-開發工具
            interviewInfo.Expertise_Tools          = GetExpertise(sheet, row, 7, 12);
            interviewInfo.Expertise_Tools_Framwork = sheet.Range[row, 9].Value.Trim();
            row += 2;
            ////專長-Devops
            interviewInfo.Expertise_Devops = GetExpertise(sheet, row, 9, 11);
            row += 2;
            ////專長-作業系統
            interviewInfo.Expertise_OS = GetExpertise(sheet, row, 9, 11);
            row += 2;
            ////專長-大數據
            interviewInfo.Expertise_BigData = GetExpertise(sheet, row, 7, 9);
            row += 2;
            ////專長-資料庫
            interviewInfo.Expertise_DataBase = GetExpertise(sheet, row, 8, 10);
            row += 2;
            ////專長-專業認證
            interviewInfo.Expertise_Certification = GetExpertise(sheet, row, 9, 11);
            row += 3;
            ////語言能力
            List <Language> languageList = new List <Language>();

            while (sheet.Range["C" + row].Value.Trim() != "最近三年內,是否有計畫繼續就學或出國深造?")
            {
                Language language = new Language
                {
                    Language_Name = sheet.Range["D" + row].Value.Trim(),
                    Listen        = sheet.Range["E" + row].Value.Trim(),
                    Speak         = sheet.Range["F" + row].Value.Trim(),
                    Read          = sheet.Range["G" + row].Value.Trim(),
                    Write         = sheet.Range["H" + row].Value.Trim(),
                };

                if (!language.TResultIsEmtpty())
                {
                    languageList.Add(language);
                }
                row++;
            }
            interviewInfo.Language = JsonConvert.SerializeObject(languageList, Formatting.Indented);
            interviewInfo.Language = interviewInfo.Language == "[]" ? string.Empty : interviewInfo.Language;
            row++;
            interviewInfo.IsStudy = sheet.Range["C" + row].Value.Trim();
            row += 2;
            interviewInfo.IsService = sheet.Range["F" + row].Value.Trim();
            interviewInfo.Relatives_Relationship = sheet.Range["J" + row].Value.Trim();
            interviewInfo.Relatives_Name         = sheet.Range["N" + row].Value.Trim();
            row += 2;
            interviewInfo.Care_Work   = sheet.Range["F" + row].Value.Trim();
            interviewInfo.Hope_Salary = sheet.Range["J" + row].Value.Trim();
            interviewInfo.When_Report = sheet.Range["N" + row].Value.Trim();
            row += 2;
            interviewInfo.Advantage     = sheet.Range["D" + row].Value.Trim();
            interviewInfo.Disadvantages = sheet.Range["J" + row].Value.Trim();
            row += 2;
            interviewInfo.Hobby = sheet.Range["D" + row].Value.Trim();
            row += 3;
            interviewInfo.Attract_Reason = sheet.Range["C" + row].Value.Trim();
            row += 3;
            interviewInfo.Future_Goal = sheet.Range["C" + row].Value.Trim();
            row += 3;
            interviewInfo.Hope_Supervisor = sheet.Range["C" + row].Value.Trim();
            row += 3;
            interviewInfo.Hope_Promise = sheet.Range["C" + row].Value.Trim();
            row += 3;
            interviewInfo.Introduction = sheet.Range["C" + row].Value.Trim();

            List <InterviewInfo> interviewInfoList = new List <InterviewInfo>
            {
                interviewInfo
            };

            dt = interviewInfoList.ListToDataTable();

            return(dt);
        }
示例#3
0
        public InterviewInfo TestExcelInterviewInfoData()
        {
            InterviewInfo interviewInfo = new InterviewInfo
            {
                Image                 = @".\images\member.jpg",
                Vacancies             = "軟體工程師",
                Name                  = "賴志維",
                Married               = "未婚",
                Adress                = "雲林縣斗六市八德里文化路690-29號",
                Urgent_Contact_Person = "賴雲慈",
                Interview_Date        = "2017/07/20",
                Sex  = "男",
                Mail = "*****@*****.**",
                Urgent_Relationship = "父子",
                Birthday            = "1995/06/16",
                CellPhone           = "0978535528",
                Urgent_CellPhone    = "0965438536"
            };

            ////學歷
            List <Education> educationList = new List <Education>();
            Education        education     = new Education()
            {
                School         = "國立屏東科技大學",
                Department     = "資訊管理系",
                Start_End_Date = "102/09~106/06",
                Is_Graduation  = "畢業",
                Remark         = "校內專題競賽第二名\n全國專題競賽佳作"
            };

            educationList.Add(education);
            Education education1 = new Education()
            {
                School         = "國立斗六高級家事商業職業學校",
                Department     = "資料處理科",
                Start_End_Date = "99/09~102/06",
                Is_Graduation  = "畢業",
                Remark         = string.Empty
            };

            educationList.Add(education1);
            interviewInfo.Education = educationList.ToJson();
            ////工作經驗
            List <WorkExperience> workExperienceList = new List <WorkExperience>();
            WorkExperience        workExperience     = new WorkExperience
            {
                Institution_name = "屏東科技大學",
                Position         = "學生",
                Start_End_Date   = "102/09~106/06",
                Start_Salary     = "0",
                End_Salary       = "0",
                Leaving_Reason   = "畢業"
            };

            workExperienceList.Add(workExperience);
            interviewInfo.Work_Experience = workExperienceList.ToJson();
            //interviewInfo.Work_Experience = "[]";
            ////兵役
            interviewInfo.During_Service   = string.Empty;
            interviewInfo.Exemption_Reason = "體重過輕";
            ////語言能力
            List <Language> languageList = new List <Language>();
            Language        language     = new Language
            {
                Language_Name = "英文",
                Listen        = "平",
                Speak         = "略",
                Read          = "平",
                Write         = "略"
            };

            languageList.Add(language);
            interviewInfo.Language = languageList.ToJson();
            ////專長
            interviewInfo.Expertise_Language      = "C#,R,Android";
            interviewInfo.Expertise_Tools         = "Visual Studio,Eclipse,R Studio,Framwork:ASP.NET";
            interviewInfo.Expertise_Devops        = "Git";
            interviewInfo.Expertise_OS            = "Windows,Android";
            interviewInfo.Expertise_BigData       = string.Empty;
            interviewInfo.Expertise_DataBase      = "Oracle,MS SQL,QQ";
            interviewInfo.Expertise_Certification = string.Empty;


            ////問題
            interviewInfo.IsStudy   = "無";
            interviewInfo.IsService = "無";
            interviewInfo.Relatives_Relationship = "無";
            interviewInfo.Relatives_Name         = "無";
            interviewInfo.Care_Work       = "無";
            interviewInfo.Hope_Salary     = "無";
            interviewInfo.When_Report     = "無";
            interviewInfo.Advantage       = "無";
            interviewInfo.Disadvantages   = "無";
            interviewInfo.Hobby           = "無";
            interviewInfo.Attract_Reason  = "無";
            interviewInfo.Future_Goal     = "無";
            interviewInfo.Hope_Supervisor = "無";
            interviewInfo.Hope_Promise    = "無";
            interviewInfo.Introduction    = "無";

            return(interviewInfo);
        }