예제 #1
0
    /// <summary>
    /// Get the Email ID of head count approver by department name for sending to approve mail.
    /// </summary>
    /// <param name="DepartmentName"></param>
    /// <returns></returns>
    private string GetEmailIdForDeptWiseHeadCountApprovalMailTo(string DepartmentName)
    {
        string mailTo = string.Empty;

        try
        {
            Rave.HR.BusinessLayer.MRF.MRFDetail MRFDetailsBL  = new Rave.HR.BusinessLayer.MRF.MRFDetail();
            List <BusinessEntities.MRFDetail>   listMRFDetail = new List <BusinessEntities.MRFDetail>();

            //Get all the data of department wise approver.
            listMRFDetail = MRFDetailsBL.GetEmailIdForHeadCountApproval();
            foreach (BusinessEntities.MRFDetail itemMRF in listMRFDetail)
            {
                //Check whether department name is same then assign approver email id to mailto.
                if (itemMRF.DepartmentName == DepartmentName)
                {
                    mailTo = itemMRF.EmailId;
                    break;
                }
            }
            return(mailTo);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmailIdForDeptWiseHeadCountApprovalMailTo", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }
예제 #2
0
    /// <summary>
    /// Change the status of MRF and also reson.
    /// </summary>
    private void SetReasonOfApproveRejectMRF(ref string ConfirmMasg)
    {
        try
        {
            Rave.HR.BusinessLayer.MRF.MRFDetail MRFBL = new Rave.HR.BusinessLayer.MRF.MRFDetail();
            int MRFStatusID;

            //Call the data layer method  & return updated MRF status id.
            MRFStatusID = MRFBL.SetMRFSatusAfterApproval(mrfDetail, ref ConfirmMasg);

            //Refresh the grid
            GetApproveRejectMRFPage();
        }
        //catches RaveHRException exception
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, SET_REASON, EventIDConstants.RAVE_HR_RP_PRESENTATION_LAYER);
        }
    }