public Common.ClientResult.Result Logon([FromBody] Langben.App.Models.LogonModel logonModel)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();

            if (ModelState.IsValid)
            {
                DAL.Account model = m_BLL.ValidateUser(logonModel.PersonName, logonModel.Password);
                if (model != null)
                {//登录成功
                    IBLL.IResumeBLL rBll    = new ResumeBLL();
                    var             data    = rBll.GetByAccountID(model.Id).FirstOrDefault();
                    Common.Account  account = new Common.Account();
                    account.Name     = model.Name;
                    account.Id       = model.Id;
                    account.ResumeId = data.Id;
                    Utils.WriteCookie("account", account, 7);
                    result.Code = Common.ClientCode.Succeed;
                }
                else
                {
                    result.Code = Common.ClientCode.FindNull;
                }
            }
            else
            {
                result.Code = Common.ClientCode.Fail;
            }
            return(result);
        }
 /// <summary>
 /// The constructor of the Resumes controller.
 /// </summary>
 public ResumesController(
     ILogger <ResumesController> logger,
     IMapper mapper,
     ResumeBLL bll
     )
 {
     this.logger = logger;
     this.mapper = mapper;
     this.bll    = bll;
 }
Example #3
0
        public T_HR_RESUME GetResumeByNumber(string sNumberId)
        {

            using (ResumeBLL bll = new ResumeBLL())
            {
                return bll.GetResumeByNumber(sNumberId);
            }
        }
Example #4
0
 public bool ResumeDelete(string[] resumeID)
 {
     using (ResumeBLL bll = new ResumeBLL())
     {
         return (bll.ResumeDelete(resumeID) == 0);
     }
 }
Example #5
0
 public void ResumeUpdate(T_HR_RESUME entity, List<T_HR_EXPERIENCE> experience, List<T_HR_EDUCATEHISTORY> eduHistory, List<T_HR_EXPERIENCE> delexps, List<T_HR_EDUCATEHISTORY> deledus, ref string strMsg)
 {
     using (ResumeBLL bll = new ResumeBLL())
     {
         bll.ResumeUpdate(entity, ref  strMsg);
         ExperienceBLL expbll = new ExperienceBLL();
         expbll.ExperienceDelete(delexps);
         expbll.ExperienceUpdate(experience);
         EducateHistoryBLL edubll = new EducateHistoryBLL();
         edubll.EducateHistoryDelete(deledus);
         edubll.EducateHistoryUpdate(eduHistory);
     }
 }
Example #6
0
 public void ResumeAdd(T_HR_RESUME entity, T_HR_EXPERIENCE[] experience, T_HR_EDUCATEHISTORY[] eduHistory, ref string strMsg)
 {
     using (ResumeBLL bll = new ResumeBLL())
     {
         bll.ResumeAdd(entity, ref strMsg);
         ExperienceBLL expbll = new ExperienceBLL();
         foreach (var exp in experience)
         {
             expbll.ExperienceAdd(exp);
         }
         EducateHistoryBLL edubll = new EducateHistoryBLL();
         foreach (var edu in eduHistory)
         {
             edubll.EducateHistoryAdd(edu);
         }
     }
 }
Example #7
0
 public T_HR_RESUME GetResumeByid(string resumeID)
 {
     using (ResumeBLL bll = new ResumeBLL())
     {
         return bll.GetResumeByid(resumeID);
     }
 }
Example #8
0
 public List<T_HR_RESUME> GetResumePaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount)
 {
     using (ResumeBLL bll = new ResumeBLL())
     {
         IQueryable<T_HR_RESUME> q = bll.QueryWithPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount);
         return q.Count() > 0 ? q.ToList() : null;
     }
 }
 public ResumeApiController(ResumeBLL bll)
 {
     m_BLL = bll;
 }
Example #10
0
        public RJMMutation(
            DocumentBLL documentBLL,
            DocumentTypeBLL documentTypeBLL,
            ResumeBLL resumeBLL,
            ResumeStateBLL resumeStateBLL,
            SkillBLL skillBLL,
            SkillAliasBLL skillAliasBLL,
            JobBLL jobBLL,
            JobStateBLL jobStateBLL
            )
        {
            this.AuthorizeWith("Authorized");

            // Documents
            //FieldAsync<DocumentType>(
            //    "createDocument",
            //    arguments: new QueryArguments(
            //        new QueryArgument<NonNullGraphType<DocumentInputType>>
            //        {
            //            Name = "document"
            //        }
            //    ),
            //    resolve: async context =>
            //    {
            //        Document document = context.GetArgument<Document>("document");

            //        return await context.TryAsyncResolve(
            //            async c => await documentBLL.CreateDocumentAsync(document)
            //        );
            //    }
            //);

            FieldAsync <GraphQLTypes.DocumentType>(
                "updateDocument",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <GraphQLTypes.DocumentInputType> >
            {
                Name = "document"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                Document document = context.GetArgument <Document>("document");

                return(await context.TryAsyncResolve(
                           async c => await documentBLL.UpdateDocumentAsync(document)
                           ));
            }
                );

            FieldAsync <GraphQLTypes.DocumentType>(
                "linkResumeToDocument",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <DocumentResumeInputType> >
            {
                Name = "documentResume"
            }
                    ),
                resolve: async context =>
            {
                DocumentResume documentResume = context.GetArgument <DocumentResume>("documentResume");

                return(await context.TryAsyncResolve(
                           async c => await documentBLL.LinkResumeToDocumentAsync(documentResume)
                           ));
            }
                );

            FieldAsync <GraphQLTypes.DocumentType>(
                "unlinkResumeFromDocument",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <DocumentResumeInputType> >
            {
                Name = "documentResume"
            }
                    ),
                resolve: async context =>
            {
                DocumentResume documentResume = context.GetArgument <DocumentResume>("documentResume");

                return(await context.TryAsyncResolve(
                           async c => await documentBLL.UnlinkResumeFromDocumentAsync(documentResume)
                           ));
            }
                );

            FieldAsync <GraphQLTypes.DocumentType>(
                "removeDocument",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await documentBLL.DeleteDocumentByIdAsync(id)
                           ));
            }
                );

            // DocumentTypes
            FieldAsync <DocumentTypeType>(
                "createDocumentType",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <DocumentTypeInputType> >
            {
                Name = "documentType"
            }
                    ),
                resolve: async context =>
            {
                APIModels.DocumentType documentType = context.GetArgument <APIModels.DocumentType>("documentType");

                return(await context.TryAsyncResolve(
                           async c => await documentTypeBLL.CreateDocumentTypeAsync(documentType)
                           ));
            }
                );

            FieldAsync <DocumentTypeType>(
                "updateDocumentType",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <DocumentTypeInputType> >
            {
                Name = "documentType"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                APIModels.DocumentType documentType = context.GetArgument <APIModels.DocumentType>("documentType");

                return(await context.TryAsyncResolve(
                           async c => await documentTypeBLL.UpdateDocumentTypeAsync(documentType)
                           ));
            }
                );

            FieldAsync <DocumentTypeType>(
                "removeDocumentType",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await documentTypeBLL.DeleteDocumentTypeByIdAsync(id)
                           ));
            }
                );

            // Resumes
            FieldAsync <ResumeType>(
                "createResume",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ResumeInputType> >
            {
                Name = "resume"
            }
                    ),
                resolve: async context =>
            {
                Resume resume = context.GetArgument <Resume>("resume");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.CreateResumeAsync(resume)
                           ));
            }
                );

            FieldAsync <ResumeType>(
                "updateResume",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <ResumeInputType> >
            {
                Name = "resume"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                Resume resume = context.GetArgument <Resume>("resume");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.UpdateResumeAsync(resume)
                           ));
            }
                );

            FieldAsync <ResumeType>(
                "linkDocumentToResume",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <DocumentResumeInputType> >
            {
                Name = "documentResume"
            }
                    ),
                resolve: async context =>
            {
                DocumentResume documentResume = context.GetArgument <DocumentResume>("documentResume");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.LinkDocumentToResumeAsync(documentResume)
                           ));
            }
                );

            FieldAsync <ResumeType>(
                "unlinkDocumentFromResume",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <DocumentResumeInputType> >
            {
                Name = "documentResume"
            }
                    ),
                resolve: async context =>
            {
                DocumentResume documentResume = context.GetArgument <DocumentResume>("documentResume");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.UnlinkDocumentFromResumeAsync(documentResume)
                           ));
            }
                );

            FieldAsync <ResumeType>(
                "linkSkillToResume",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ResumeSkillInputType> >
            {
                Name = "resumeSkill"
            }
                    ),
                resolve: async context =>
            {
                ResumeSkill resumeSkill = context.GetArgument <ResumeSkill>("resumeSkill");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.LinkSkillToResumeAsync(resumeSkill)
                           ));
            }
                );

            FieldAsync <ResumeType>(
                "unlinkSkillFromResume",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ResumeSkillInputType> >
            {
                Name = "resumeSkill"
            }
                    ),
                resolve: async context =>
            {
                ResumeSkill resumeSkill = context.GetArgument <ResumeSkill>("resumeSkill");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.UnlinkSkillFromResumeAsync(resumeSkill)
                           ));
            }
                );

            FieldAsync <ResumeType>(
                "removeResume",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await resumeBLL.DeleteResumeByIdAsync(id)
                           ));
            }
                );

            // ResumeStates
            FieldAsync <ResumeStateType>(
                "createResumeState",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ResumeStateInputType> >
            {
                Name = "resumeState"
            }
                    ),
                resolve: async context =>
            {
                ResumeState resumeState = context.GetArgument <ResumeState>("resumeState");

                return(await context.TryAsyncResolve(
                           async c => await resumeStateBLL.CreateResumeStateAsync(resumeState)
                           ));
            }
                );

            FieldAsync <ResumeStateType>(
                "updateResumeState",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <ResumeStateInputType> >
            {
                Name = "resumeState"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                ResumeState resumeState = context.GetArgument <ResumeState>("resumeState");

                return(await context.TryAsyncResolve(
                           async c => await resumeStateBLL.UpdateResumeStateAsync(resumeState)
                           ));
            }
                );

            FieldAsync <ResumeStateType>(
                "removeResumeState",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await resumeStateBLL.DeleteResumeStateByIdAsync(id)
                           ));
            }
                );

            // Skills
            FieldAsync <SkillType>(
                "createSkill",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <SkillInputType> >
            {
                Name = "skill"
            }
                    ),
                resolve: async context =>
            {
                Skill skill = context.GetArgument <Skill>("skill");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.CreateSkillAsync(skill)
                           ));
            }
                );

            FieldAsync <SkillType>(
                "updateSkill",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <SkillInputType> >
            {
                Name = "skill"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                Skill skill = context.GetArgument <Skill>("skill");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.UpdateSkillAsync(skill)
                           ));
            }
                );

            FieldAsync <SkillType>(
                "linkResumeToSkill",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ResumeSkillInputType> >
            {
                Name = "resumeSkill"
            }
                    ),
                resolve: async context =>
            {
                ResumeSkill resumeSkill = context.GetArgument <ResumeSkill>("resumeSkill");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.LinkResumeToSkillAsync(resumeSkill)
                           ));
            }
                );

            FieldAsync <SkillType>(
                "unlinkResumeFromSkill",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <ResumeSkillInputType> >
            {
                Name = "resumeSkill"
            }
                    ),
                resolve: async context =>
            {
                ResumeSkill resumeSkill = context.GetArgument <ResumeSkill>("resumeSkill");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.UnlinkResumeFromSkillAsync(resumeSkill)
                           ));
            }
                );

            FieldAsync <SkillType>(
                "linkJobToSkill",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <JobSkillInputType> >
            {
                Name = "jobSkill"
            }
                    ),
                resolve: async context =>
            {
                JobSkill jobSkill = context.GetArgument <JobSkill>("jobSkill");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.LinkJobToSkillAsync(jobSkill)
                           ));
            }
                );

            FieldAsync <SkillType>(
                "unlinkJobFromSkill",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <JobSkillInputType> >
            {
                Name = "jobSkill"
            }
                    ),
                resolve: async context =>
            {
                JobSkill jobSkill = context.GetArgument <JobSkill>("jobSkill");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.UnlinkJobFromSkillAsync(jobSkill)
                           ));
            }
                );

            FieldAsync <SkillType>(
                "removeSkill",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await skillBLL.DeleteSkillByIdAsync(id)
                           ));
            }
                );

            // SkillAliases
            FieldAsync <SkillAliasType>(
                "createSkillAlias",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <SkillAliasInputType> >
            {
                Name = "skillAlias"
            }
                    ),
                resolve: async context =>
            {
                SkillAlias skillAlias = context.GetArgument <SkillAlias>("skillAlias");

                return(await context.TryAsyncResolve(
                           async c => await skillAliasBLL.CreateSkillAliasAsync(skillAlias)
                           ));
            }
                );

            FieldAsync <SkillAliasType>(
                "updateSkillAlias",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <SkillAliasInputType> >
            {
                Name = "skillAlias"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                SkillAlias skillAlias = context.GetArgument <SkillAlias>("skillAlias");

                return(await context.TryAsyncResolve(
                           async c => await skillAliasBLL.UpdateSkillAliasAsync(skillAlias)
                           ));
            }
                );

            FieldAsync <SkillAliasType>(
                "removeSkillAlias",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await skillAliasBLL.DeleteSkillAliasByIdAsync(id)
                           ));
            }
                );

            // Jobs
            FieldAsync <JobType>(
                "createJob",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <JobInputType> >
            {
                Name = "job"
            }
                    ),
                resolve: async context =>
            {
                Job job = context.GetArgument <Job>("job");

                return(await context.TryAsyncResolve(
                           async c => await jobBLL.CreateJobAsync(job)
                           ));
            }
                );

            FieldAsync <JobType>(
                "updateJob",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <JobInputType> >
            {
                Name = "job"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                Job job = context.GetArgument <Job>("job");

                return(await context.TryAsyncResolve(
                           async c => await jobBLL.UpdateJobAsync(job)
                           ));
            }
                );

            FieldAsync <JobType>(
                "linkSkillToJob",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <JobSkillInputType> >
            {
                Name = "jobSkill"
            }
                    ),
                resolve: async context =>
            {
                JobSkill jobSkill = context.GetArgument <JobSkill>("jobSkill");

                return(await context.TryAsyncResolve(
                           async c => await jobBLL.LinkSkillToJobAsync(jobSkill)
                           ));
            }
                );

            FieldAsync <JobType>(
                "unlinkSkillFromJob",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <JobSkillInputType> >
            {
                Name = "jobSkill"
            }
                    ),
                resolve: async context =>
            {
                JobSkill jobSkill = context.GetArgument <JobSkill>("jobSkill");

                return(await context.TryAsyncResolve(
                           async c => await jobBLL.UnlinkSkillFromJobAsync(jobSkill)
                           ));
            }
                );

            FieldAsync <JobType>(
                "removeJob",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await jobBLL.DeleteJobByIdAsync(id)
                           ));
            }
                );

            // JobStates
            FieldAsync <JobStateType>(
                "createJobState",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <JobStateInputType> >
            {
                Name = "jobState"
            }
                    ),
                resolve: async context =>
            {
                JobState jobState = context.GetArgument <JobState>("jobState");

                return(await context.TryAsyncResolve(
                           async c => await jobStateBLL.CreateJobStateAsync(jobState)
                           ));
            }
                );

            FieldAsync <JobStateType>(
                "updateJobState",
                arguments: new QueryArguments(
                    //new QueryArgument<NonNullGraphType<IdGraphType>>
                    //{
                    //    Name = "id"
                    //},
                    new QueryArgument <NonNullGraphType <JobStateInputType> >
            {
                Name = "jobState"
            }
                    ),
                resolve: async context =>
            {
                //Guid id = context.GetArgument<Guid>("id");
                JobState jobState = context.GetArgument <JobState>("jobState");

                return(await context.TryAsyncResolve(
                           async c => await jobStateBLL.UpdateJobStateAsync(jobState)
                           ));
            }
                );

            FieldAsync <JobStateType>(
                "removeJobState",
                arguments: new QueryArguments(
                    new QueryArgument <NonNullGraphType <IdGraphType> >
            {
                Name = "id"
            }
                    ),
                resolve: async context =>
            {
                Guid id = context.GetArgument <Guid>("id");

                return(await context.TryAsyncResolve(
                           async c => await jobStateBLL.DeleteJobStateByIdAsync(id)
                           ));
            }
                );
        }
        public ActionResult UploadResume(string languageType, string sourceSite, string projectName)                                        //, string postName
        {
            if (string.IsNullOrWhiteSpace(sourceSite) || string.IsNullOrWhiteSpace(languageType) || string.IsNullOrWhiteSpace(projectName)) // || string.IsNullOrWhiteSpace(postName)
            {
                var projects = proBll.GetAllProjects();
                ViewData["Projects"] = ChangeProjectModelToViewModel(projects.ToList());
                return(View("Create"));
            }

            if (!sourceSite.Equals("ZL") && !sourceSite.Equals("WY"))
            {
                var projects = proBll.GetAllProjects();
                ViewData["Projects"] = ChangeProjectModelToViewModel(projects.ToList());
                return(View("Create"));
            }

            app = new ApplicationClass();

            for (int k = 0; k < Request.Files.Count; k++)
            {
                HttpPostedFileBase file = Request.Files.Get(k);

                List <string> content = new List <string>();
                if (file == null || file.ContentLength <= 0)
                {
                    return(Content("没有文件!", "text/plain"));
                }

                string     fileName = string.Format("{0}--{1}", DateTime.Now.ToString("yyyyMMddhhmmss"), Path.GetFileName(file.FileName));
                string     filePath = Path.Combine(LocalResumeFolderPath, fileName);
                FileStream fs       = new FileStream(filePath, FileMode.Create, FileAccess.Write);
                fs.Close();
                file.SaveAs(filePath);

                Resume resume;
                try
                {
                    object fileobj = (object)filePath;
                    app.Visible = false;
                    doc         = app.Documents.Open(
                        ref fileobj, ref unknow, ref unknow, ref unknow, ref unknow,
                        ref unknow, ref unknow, ref unknow, ref unknow, ref unknow,
                        ref unknow, ref unknow, ref unknow, ref unknow, ref unknow);

                    for (int i = 1; i <= doc.Paragraphs.Count; i++)
                    {
                        if (doc.Paragraphs[i].Range.Text.Equals("\r\a"))
                        {
                            continue;
                        }

                        content.Add(doc.Paragraphs[i].Range.Text.Replace(" ", " ").Replace("/", "").Replace("\v", "\r"));
                    }

                    doc.Close();

                    if (sourceSite.Equals("ZL"))
                    {
                        resume = ResumeHelper.getZLResumeEntity(content);
                    }
                    else
                    {
                        resume = ResumeHelper.GetWYResumeEntity(content);
                    }

                    switch (sourceSite)
                    {
                    case "ZL":
                        resume.SourceSite = "智联招聘";
                        break;

                    case "WY":
                        resume.SourceSite = "前程无忧";
                        break;

                    default:
                        resume.SourceSite = "";
                        break;
                    }

                    resume.Id           = Guid.NewGuid().ToString();
                    resume.FilePath     = fileName;
                    resume.UploadTime   = DateTime.Now;
                    resume.LanguageType = languageType;
                    resume.ProjectName  = projectName;
                    ResumeBLL opt = new ResumeBLL();
                    opt.SaveResume(resume);
                }
                catch (Exception e)
                {
                    if (doc != null)
                    {
                        doc.Close();
                    }
                    if (app != null)
                    {
                        app.Quit();
                    }

                    return(Content("上传异常!" + e.Message, "text/plain"));
                }
            }

            app.Quit();
            return(RedirectToAction("Index"));
        }