private void UploadResume()
    {
        string sql, ext, fn, path, ResumeContent = "";
        int    i;

        if (FU_Resume.HasFile)
        {
            fn = FU_Resume.FileName;
            i  = fn.LastIndexOf(".");

            ext  = fn.Substring(i, fn.Length - i);
            path = Server.MapPath("CandidateResumes");
            path = path + "\\" + Session["MemberId"].ToString() + ext;

            FU_Resume.SaveAs(path);

            ResumeContent = ExtractTextFromPdf(Server.MapPath("CandidateResumes/" + Session["MemberId"].ToString() + ext));
            ResumeContent = c1.Clean(ResumeContent);

            sql = "UPDATE tbl_Member SET Resume_Url='CandidateResumes/" + Session["MemberId"].ToString() + ext + "',";
            sql = sql + " ResumeContent='" + ResumeContent + "'";
            sql = sql + " WHERE MemberId=" + Session["MemberId"].ToString();

            c1.ExecuteQry(sql);


            sql = "DELETE FROM tbl_MemberSkills WHERE MemberId=" + Session["MemberId"].ToString() + ";";
            sql = sql + "INSERT INTO tbl_MemberSkills (MemberId, SkillId) SELECT '" + Session["MemberId"].ToString() + "', SkillId FROM tbl_Skills where '" + ResumeContent + "' LIKE  '%'+SkillName+'%'";

            c1.ExecuteQry(sql);
        }
    }
Example #2
0
    private void UploadResume()
    {
        string sql, ext, fn, path;
        int    i;

        if (FU_Resume.HasFile)
        {
            fn = FU_Resume.FileName;
            i  = fn.LastIndexOf(".");

            ext  = fn.Substring(i, fn.Length - i);
            path = Server.MapPath("CandidateResumes");
            path = path + "\\" + Session["MemberId"].ToString() + ext;

            FU_Resume.SaveAs(path);

            sql = "UPDATE tbl_Member SET Resume_Url='CandidateResumes/" + Session["MemberId"].ToString() + ext + "'";
            sql = sql + " WHERE MemberId=" + Session["MemberId"].ToString();

            c1.ExecuteQry(sql);
        }
    }