public int AddCandidate(Candidate m_Cand, HttpPostedFileBase fileUpload)
        {
            if (fileUpload != null && fileUpload.ContentLength > 0)
            {
                string   m_FileName = fileUpload.FileName;
                string[] splitFile  = m_FileName.Split('.');
                string   fileType   = splitFile[1];

                m_Cand.Resume       = FileToText(fileUpload, fileType);
                m_Cand.ResumeBinary = FileToBinary(fileUpload);
                m_Cand.FileType     = fileType;
            }
            else
            {
                m_Cand.Resume       = "";
                m_Cand.ResumeBinary = new byte[0];
                m_Cand.FileType     = "";
            }


            int m_Id = DBCandidate.AddCandidate(m_Cand);

            return(m_Id);
        }
        public List <Note> GetNotes(int id)
        {
            List <Note> m_Notes = DBCandidate.GetNotes(id);

            return(m_Notes);
        }
        public List <Interview> GetInterviews(int id)
        {
            List <Interview> m_Interviews = DBCandidate.GetInterviews(id);

            return(m_Interviews);
        }
        public List <Resume> GetResumesSent(int id)
        {
            List <Resume> m_ResumesSent = DBCandidate.GetResumesSent(id);

            return(m_ResumesSent);
        }
        public List <Candidate> GetCandidatesByCompanyId(int id)
        {
            List <Candidate> m_Candidates = DBCandidate.GetCandidatesByCompanyId(id);

            return(m_Candidates);
        }
        public int GetNumCandidates(string filter, int mode)
        {
            int num_Candidates = DBCandidate.GetNumCandidates(filter, mode);

            return(num_Candidates);
        }
        public List <Candidate> Pagination(int pageNum, int mode, string filter)
        {
            List <Candidate> m_Candidates = DBCandidate.Pagination(pageNum, mode, filter);

            return(m_Candidates);
        }
        public List <Candidate> RetrieveAll()
        {
            List <Candidate> m_Cands = DBCandidate.RetrieveAll();

            return(m_Cands);
        }
        public Candidate RetrieveOne(int id)
        {
            Candidate m_Cand = DBCandidate.RetrieveOne(id);

            return(m_Cand);
        }
 public void DeleteCandidate(int id)
 {
     DBCandidate.DeleteCandidate(id);
 }
 public void UpdateCandidate(Candidate m_Cand)
 {
     DBCandidate.UpdateCandidate(m_Cand);
 }
 public void SendResume(int id, int JobOrderId, string EmailText)
 {
     DBCandidate.SendResume(id, JobOrderId);
 }
        public byte[] ViewResume(int id)
        {
            byte[] m_Resume = DBCandidate.ViewResume(id);

            return(m_Resume);
        }
 public void UploadResume(int id, byte[] resume, string fileType, string fileText)
 {
     DBCandidate.UploadResume(id, resume, fileType, fileText);
 }