/// <summary>
    ///  method to get value of BussinessSegmentDropDown
    /// </summary>
    private void GetMasterData_BussinessSegmentDropDown()
    {
        try
        {
            List <BusinessEntities.Master>      objRaveHRMaster    = new List <BusinessEntities.Master>();
            Rave.HR.BusinessLayer.Common.Master objRaveHRMasterBAL = new Rave.HR.BusinessLayer.Common.Master();
            objRaveHRMaster = objRaveHRMasterBAL.GetMasterData((Convert.ToInt32(EnumsConstants.Category.ProjectBussinessSegment)).ToString());
            objRaveHRMaster.Remove(objRaveHRMaster.Find(a => a.MasterName == "N/A"));

            ddlBusinessSegment.DataSource     = objRaveHRMaster;
            ddlBusinessSegment.DataTextField  = "MasterName";
            ddlBusinessSegment.DataValueField = "MasterID";
            ddlBusinessSegment.DataBind();
            ddlBusinessSegment.Items.Insert(0, "Select");
        }

        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, "HeadCountReport.aspx", "GetMasterData_BussinessSegmentDropDown", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
예제 #2
0
    /// <summary>
    /// Gets the master data for the Asset or employee dropdown.
    /// </summary>
    private void GetMasterDataForBranch()
    {
        try
        {
            List <BusinessEntities.Master>      ddlObj   = new List <BusinessEntities.Master>();
            Rave.HR.BusinessLayer.Common.Master BLobject = new Rave.HR.BusinessLayer.Common.Master();

            //Get the Branchs of rave.
            ddlObj = BLobject.GetMasterData(Convert.ToString((int)(EnumsConstants.Category.RaveBranch)));

            //Bind the dropdown with data.
            ddlBranch.DataSource     = ddlObj;
            ddlBranch.DataValueField = MasterID;
            ddlBranch.DataTextField  = MasterName;
            ddlBranch.DataBind();
            ddlBranch.Items.Insert(0, new ListItem(SELECTONE, ZERO));
        }

        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetMasterDataForBranch", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
        }
    }
예제 #3
0
    /// <summary>
    /// Fills Status drop down
    /// </summary>
    private void FillStatusDropDown()
    {
        List <BusinessEntities.Master> objRaveHRMaster = new List <BusinessEntities.Master>();

        Rave.HR.BusinessLayer.Common.Master objRaveHRMasterBAL = new Rave.HR.BusinessLayer.Common.Master();

        try
        {
            objRaveHRMaster          = objRaveHRMasterBAL.GetMasterData(Convert.ToInt32(EnumsConstants.Category.ProjectStatus).ToString());
            ddlStatus.DataSource     = objRaveHRMaster;
            ddlStatus.DataTextField  = "MasterName";
            ddlStatus.DataValueField = "MasterID";
            ddlStatus.DataBind();
            ddlStatus.Items.Insert(0, SELECT);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "FillStatusDropDown", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
예제 #4
0
    /// <summary>
    /// Gets the master data for the Asset or employee dropdown.
    /// </summary>
    private void GetMasterData_EmployeeAsset()
    {
        try
        {
            List <BusinessEntities.Master>      ddlObj   = new List <BusinessEntities.Master>();
            Rave.HR.BusinessLayer.Common.Master BLobject = new Rave.HR.BusinessLayer.Common.Master();

            //This region will fill the client location drop down with the valid location types.
            ddlObj = BLobject.GetMasterData(Convert.ToString(SeatAllocationCategory));

            ddlEmpAsset.DataSource     = ddlObj;
            ddlEmpAsset.DataValueField = MasterID;
            ddlEmpAsset.DataTextField  = MasterName;
            ddlEmpAsset.DataBind();
            ddlEmpAsset.Items.Insert(0, new ListItem(SELECTONE, ZERO));
        }

        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetMasterData_LocationDropDown", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
        }
    }