/// <summary>
    /// Gets the certification details.
    /// </summary>
    /// <returns></returns>
    private BusinessEntities.RaveHRCollection GetEmployeeResume(int employeeID)
    {
        Rave.HR.BusinessLayer.Employee.EmployeeResume objEmployeeResumeBAL;
        BusinessEntities.EmployeeResume objEmployeeResume;

        // Initialise Collection class object
        BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();

        try
        {
            objEmployeeResumeBAL = new Rave.HR.BusinessLayer.Employee.EmployeeResume();
            objEmployeeResume    = new BusinessEntities.EmployeeResume();

            //objCertificationDetails.EMPId = 14;
            objEmployeeResume.EMPId = employeeID;

            raveHRCollection = objEmployeeResumeBAL.GetEmployeeResumeDetails(objEmployeeResume);
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeeResumeDetails", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }

        return(raveHRCollection);
    }
    //19645-Ambar-End


    #endregion

    #region Private Method

    /// <summary>
    /// Uploads the specified resume count.
    /// </summary>
    /// <param name="ResumeCount">The resume count.</param>
    /// <param name="ObjEmployeeResume">The obj employee resume.</param>
    private void Upload(int ResumeCount, BusinessEntities.EmployeeResume ObjEmployeeResume)
    {
        string tt = fileResume.HasFile.ToString();
        string NewDocumentName = ((System.Web.UI.WebControls.LinkButton)(gvEmployeeResume.Rows[0].FindControl("_lnkResume"))).Text;

        string Namefilename     = lblempName.Text.Trim().ToString();
        string OldFileExtension = string.Empty;

        switch (ResumeCount + 1)
        {
        case 1:
            fileResume.SaveAs(Server.MapPath(resumePhsicalPath + NewDocumentName));
            break;

        case 2:
            OldFileExtension = ((System.Web.UI.WebControls.Label)(gvEmployeeResume.Rows[1].FindControl("lblExtension"))).Text;
            if (File.Exists(Server.MapPath(resumePhsicalPath + HfOldDocumentName.Value)))
            {
                File.Move(Server.MapPath(resumePhsicalPath + ObjEmployeeResume.DocumentName.ToString() + OldFileExtension), Server.MapPath(resumePhsicalPath + ObjEmployeeResume.DocumentName.ToString() + "_old" + OldFileExtension));
            }
            fileResume.SaveAs(Server.MapPath(resumePhsicalPath + NewDocumentName));
            break;

        case 3:
            string OldDocumentName = ((System.Web.UI.WebControls.LinkButton)(gvEmployeeResume.Rows[1].FindControl("_lnkResume"))).Text;
            OldFileExtension = ((System.Web.UI.WebControls.Label)(gvEmployeeResume.Rows[1].FindControl("lblExtension"))).Text;

            if (File.Exists(Server.MapPath(resumePhsicalPath + HfOldDocumentName.Value)))
            {
                File.Delete(Server.MapPath(resumePhsicalPath + HfOldDocumentName.Value));
            }
            if (File.Exists(Server.MapPath(resumePhsicalPath + ObjEmployeeResume.DocumentName.ToString() + OldFileExtension)))
            {
                File.Move(Server.MapPath(resumePhsicalPath + ObjEmployeeResume.DocumentName.ToString() + OldFileExtension), Server.MapPath(resumePhsicalPath + ObjEmployeeResume.DocumentName.ToString() + "_old" + OldFileExtension));
            }
            fileResume.SaveAs(Server.MapPath(resumePhsicalPath + NewDocumentName));
            break;
        }
    }
    /// <summary>
    /// Handles the Click event of the btnUpload control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        int    i;
        string fileExtension = System.IO.Path.GetExtension(fileResume.FileName).ToLower();

        if (ValidateControls())
        {
            char[] SPILITER_DOT = { '.' };
            Rave.HR.BusinessLayer.Employee.EmployeeResume objEmployeeResumeBAL;
            BusinessEntities.EmployeeResume objEmployeeResume = new BusinessEntities.EmployeeResume();
            objEmployeeResumeBAL = new Rave.HR.BusinessLayer.Employee.EmployeeResume();
            //string[] EmployeeArray = Convert.ToString(employee.EmailId.Replace("@rave-tech.com", "")).Split(SPILITER_DOT);

            objEmployeeResume.EMPId = employee.EMPId;
            string docName = "";

            //Googleconfigurable
            AuthorizationManager obj = new AuthorizationManager();
            docName = obj.GetUsernameBasedOnEmail(employee.EmailId);

            //if (employee.EmailId.ToLower().Trim().Contains("@rave-tech.com"))
            //{
            //    docName = employee.EmailId.ToLower().Replace("@rave-tech.com", "");
            //}
            //else
            //{
            //    docName = employee.EmailId.ToLower().Replace("@" + AuthorizationManagerConstants.NORTHGATEDOMAINEMAIL, "");
            //}
            objEmployeeResume.DocumentName = docName;

            //objEmployeeResume.DocumentName = employee.EmailId.Replace("@rave-tech.com", "");
            //GoogleMail
            //Googleconfigurable
            objEmployeeResume.ModifyDate = DateTime.Now;
            objEmployeeResume.ModifyBy   = obj.GetUsernameBasedOnEmail(UserRaveDomainId);
            //if (UserRaveDomainId != null && UserRaveDomainId.Contains("@rave-tech.co.in"))
            //{
            //    objEmployeeResume.ModifyBy = UserRaveDomainId.Replace("@rave-tech.co.in", "");
            //}
            //else if (UserRaveDomainId != null && UserRaveDomainId.ToLower().Contains("@" + AuthorizationManagerConstants.NORTHGATEDOMAIN))
            //{
            //    objEmployeeResume.ModifyBy = UserRaveDomainId.ToLower().Replace("@" + AuthorizationManagerConstants.NORTHGATEDOMAIN, "");
            //}

            objEmployeeResume.FileExtension = fileExtension;

            if (EmployeeResumeCollection == null)
            {
                EmployeeResumeCollection = new BusinessEntities.RaveHRCollection();
            }

            EmployeeResumeCollection.Add(objEmployeeResume);

            EmployeeResumeCollection = objEmployeeResumeBAL.AddEmployeeResumeDetails(objEmployeeResume);

            i = Convert.ToInt32(((BusinessEntities.EmployeeResume)(EmployeeResumeCollection.Item(0))).ResumeCount);

            if (gvEmployeeResume.Rows.Count > 1)
            {
                string OldDocumentName = ((System.Web.UI.WebControls.LinkButton)(gvEmployeeResume.Rows[1].FindControl("_lnkResume"))).Text;
                HfOldDocumentName.Value = OldDocumentName;
            }
            this.PopulateGrid(objEmployeeResume.EMPId);

            switch (i)
            {
            case 0:
                Upload(0, objEmployeeResume);
                break;

            case 1:
                Upload(1, objEmployeeResume);
                break;

            case 2:
                Upload(2, objEmployeeResume);
                break;
            }

            lblMessage.Text = "Employee Resume Uploaded successfully.";

            //Aarohi : Issue 30053(CR) : 22/12/2011 : Start
            //Send mail for Employee Resume Upload.
            Rave.HR.BusinessLayer.Employee.Employee employeeBL = new Rave.HR.BusinessLayer.Employee.Employee();
            employeeBL.SendUploadResumeMails(employee);
            //Aarohi : Issue 30053(CR) : 22/12/2011 : End
        }
    }