Example #1
0
    /// <summary>
    /// Fill Recruitment Manager dropdown
    /// </summary>
    private void FillRecruitmentManagerDropDown()
    {
        // Initialise Collection class object
        BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();

        // Initialise Business layer object
        Rave.HR.BusinessLayer.MRF.MRFDetail employeeNameBL = new Rave.HR.BusinessLayer.MRF.MRFDetail();

        try
        {
            raveHRCollection = employeeNameBL.GetRecruitmentManager();

            if (raveHRCollection != null)
            {
                // Assign the data source to dropdown
                ddlRecruitmentManager.DataSource = raveHRCollection;

                ddlRecruitmentManager.DataTextField  = CommonConstants.DDL_DataTextField;
                ddlRecruitmentManager.DataValueField = CommonConstants.DDL_DataValueField;

                // Bind the data to dropdown
                ddlRecruitmentManager.DataBind();

                // Default value of dropdown is "Select"
                ddlRecruitmentManager.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);
            }
        }

        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME_MRFRAISEHEADCOUNT, "FillRecruitmentManagerDropDown", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }