Exemplo n.º 1
0
    /// <summary>
    /// Fill DropDown Method
    /// </summary>
    private void FillDropDown()
    {
        //Declaring Master Class Object
        Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();
        try
        {
            BusinessEntities.MRFDetail mrfDetailobj = new BusinessEntities.MRFDetail();

            if (Session[SessionNames.MRFPREVIOUSVALUE] != null)
            {
                mrfDetailobj = (BusinessEntities.MRFDetail)Session[SessionNames.MRFPREVIOUSVALUE];
            }
            int testingDeparmentId = mrfDetailobj.DepartmentId;

            //Calling Business layer FillDropDown Method
            if (testingDeparmentId == (int)MasterEnum.MRFDepartment.Testing)
            {
                raveHRCollection = master.FillDropDownsBL(testingDeparmentId);
            }
            else
            {
                //Calling Business layer FillDropDown Method
                raveHRCollection = master.FillDropDownsBL(Convert.ToInt32(Common.EnumsConstants.Category.PrimarySkills));
            }

            //Check Collection is null or not
            if (raveHRCollection != null)
            {
                //Assign DataSOurce to Collection
                ddlSkillCategory.DataSource = raveHRCollection;

                //Assign DataText Filed to DropDown
                ddlSkillCategory.DataTextField = CommonConstants.DDL_DataTextField;

                //Assign DataValue Field to Dropdown
                ddlSkillCategory.DataValueField = CommonConstants.DDL_DataValueField;

                //Bind Dropdown
                ddlSkillCategory.DataBind();

                //Insert Select as a item for dropdown
                ddlSkillCategory.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);

                raveHRCollection.Clear();
            }
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer,
                                      CLASS_NAME_RAISEMRF_NEXT, "FillDropDown", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }
Exemplo n.º 2
0
    private void GetEmployeeLocation()
    {
        Rave.HR.BusinessLayer.Common.Master master     = new Rave.HR.BusinessLayer.Common.Master();
        BusinessEntities.RaveHRCollection   raveHrColl = new BusinessEntities.RaveHRCollection();

        try
        {
            raveHrColl = master.FillDropDownsBL((int)Common.EnumsConstants.Category.CandidateLocation);

            ddlLocation.ClearSelection();
            //ddlLocation.Items.Clear();
            ddlLocation.DataSource     = raveHrColl;
            ddlLocation.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlLocation.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlLocation.DataBind();
            ddlLocation.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeeLocation", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Exemplo n.º 3
0
    private void GetEmployeePrefix()
    {
        //Declaring COllection class object
        BusinessEntities.RaveHRCollection raveHrColl = new BusinessEntities.RaveHRCollection();

        //Declaring Master Class Object
        Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();

        try
        {
            //Calling Fill dropdown Business layer method to fill
            //the dropdown from Master class.
            raveHrColl = master.FillDropDownsBL((int)Common.EnumsConstants.Category.Prefix);

            ddlPrefix.Items.Clear();
            ddlPrefix.DataSource     = raveHrColl;
            ddlPrefix.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlPrefix.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlPrefix.DataBind();
            ddlPrefix.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeePrefix", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Exemplo n.º 4
0
    /// <summary>
    /// Gets the bifurcation.
    /// </summary>
    private void GetBifurcation()
    {
        Rave.HR.BusinessLayer.Common.Master master     = new Rave.HR.BusinessLayer.Common.Master();
        BusinessEntities.RaveHRCollection   raveHrColl = new BusinessEntities.RaveHRCollection();

        raveHrColl = master.FillDropDownsBL((int)Common.EnumsConstants.Category.ProjectDoneStatus);

        ddlBifurcation.DataSource     = raveHrColl;
        ddlBifurcation.DataTextField  = Common.CommonConstants.DDL_DataTextField;
        ddlBifurcation.DataValueField = Common.CommonConstants.DDL_DataValueField;
        ddlBifurcation.DataBind();
        ddlBifurcation.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);
    }
    /// <summary>
    /// Gets the type of the skills.
    /// </summary>
    /// <param name="SkillType">Type of the skill.</param>
    private void GetSkillsByType(int SkillType)
    {
        Rave.HR.BusinessLayer.Common.Master master     = new Rave.HR.BusinessLayer.Common.Master();
        BusinessEntities.RaveHRCollection   raveHrColl = new BusinessEntities.RaveHRCollection();

        raveHrColl = master.FillDropDownsBL(SkillType);

        ddlSkills.DataSource     = raveHrColl;
        ddlSkills.DataTextField  = Common.CommonConstants.DDL_DataTextField;
        ddlSkills.DataValueField = Common.CommonConstants.DDL_DataValueField;
        ddlSkills.DataBind();
        ddlSkills.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);
    }
    /// <summary>
    /// Gets the employee status.
    /// </summary>
    private void GetEmployeeStatus()
    {
        //Declaring Master Class Object
        Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();

        //Declaring COllection class object
        BusinessEntities.RaveHRCollection raveHrColl = new BusinessEntities.RaveHRCollection();

        //Calling Fill dropdown Business layer method to fill
        //the dropdown from Master class.
        raveHrColl = master.FillDropDownsBL((int)Common.EnumsConstants.Category.EmployeeStatus);

        ddlStatus.DataSource     = raveHrColl;
        ddlStatus.DataTextField  = Common.CommonConstants.DDL_DataTextField;
        ddlStatus.DataValueField = Common.CommonConstants.DDL_DataValueField;
        ddlStatus.DataBind();
        ddlStatus.Items.Insert(0, CommonConstants.SELECT);
    }
Exemplo n.º 7
0
 /// <summary>
 /// Get master data
 /// </summary>
 private BusinessEntities.RaveHRCollection GetMaster(int CategoryId)
 {
     BusinessEntities.RaveHRCollection objListMaster = new BusinessEntities.RaveHRCollection();
     try
     {
         Rave.HR.BusinessLayer.Common.Master objRaveMaster = new Rave.HR.BusinessLayer.Common.Master();
         objListMaster = objRaveMaster.FillDropDownsBL(CategoryId);
     }
     //catches RaveHRException exception
     catch (RaveHRException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME_RP, "GetMaster", EventIDConstants.RAVE_HR_RP_PRESENTATION_LAYER);
     }
     return(objListMaster);
 }
Exemplo n.º 8
0
    /// <summary>
    /// Fill DropDown Method
    /// </summary>
    private void GetPurposeDetails()
    {
        //Declaring Master Class Object
        Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();
        try
        {
            //Calling Business layer FillDropDown Method
            raveHRCollection = master.FillDropDownsBL(Convert.ToInt32(Common.EnumsConstants.Category.MRFPurpose));

            //Check Collection is null or not
            if (raveHRCollection != null)
            {
                //Assign DataSOurce to Collection
                ddlPurpose.DataSource = raveHRCollection;

                //Assign DataText Filed to DropDown
                ddlPurpose.DataTextField = CommonConstants.DDL_DataTextField;

                //Assign DataValue Field to Dropdown
                ddlPurpose.DataValueField = CommonConstants.DDL_DataValueField;

                //Bind Dropdown
                ddlPurpose.DataBind();

                //Insert Select as a item for dropdown
                ddlPurpose.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);

                raveHRCollection.Clear();
            }
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME_MRFRAISEHEADCOUNT, "FillDropDown", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }
Exemplo n.º 9
0
    /// <summary>
    /// Page Load Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        #region Javascript Function Call
        //Umesh: Issue 'Modal Popup issue in chrome' Starts
        //imgPurpose.Attributes.Add("onclick", "return popUpEmployeeName();");
        //Umesh: Issue 'Modal Popup issue in chrome' Ends
        #endregion

        lblPurpose.Text  = string.Empty;
        Response.Expires = 0;
        Response.Cache.SetNoStore();
        Response.AppendHeader("Pragma", "no-cache");

        if (!IsPostBack)
        {
            this.GetPurposeDetails();
        }
        if (!ValidateURL())
        {
            Response.Redirect(CommonConstants.INVALIDURL);
        }
        else
        {
            try
            {
                btnOK.Attributes.Add("onclick", "return ButtonClickValidate();");

                //Poonam : Issue : Disable Button : Starts
                btnOK.OnClientClick = "if(ButtonClickValidate()){" + ClientScript.GetPostBackEventReference(btnOK, null) + "}";
                //Poonam : Issue : Disable Button : Ends

                ddlRecruitmentManager.Attributes.Add(CommonConstants.EVENT_ONBLUR, "javascript:ValidateControl('" + spanzddlRecruitmentManager.ClientID + "','','');");

                ddlCostCode.Attributes.Add(CommonConstants.EVENT_ONBLUR, "javascript:ValidateControl('" + spanzddlCostCode.ClientID + "','','');");


                //ddlPurpose.Attributes.Add(CommonConstants.EVENT_ONBLUR, "javascript:ValidateProject();");
                //ddlPurpose.Attributes.Add(CommonConstants.EVENT_ONBLUR, "javascript:ValidateProject();");
                //imgTargetDate.Attributes.Add(CommonConstants.EVENT_ONMOUSEOVER, "javascript:ValidateControl('" + txtTargetDate.ClientID + "','','');");
                //Extract the parameters from Query String
                MrfId       = DecryptQueryString(QueryStringConstants.MRFID).ToString();
                ProjectName = DecryptQueryString(QueryStringConstants.PROJECTNAME).ToString();
                Role        = DecryptQueryString(QueryStringConstants.ROLE).ToString();
                Experience  = DecryptQueryString(QueryStringConstants.EXP).ToString();
                TargetCTC   = DecryptQueryString(QueryStringConstants.TARGETCTC).ToString();
                Department  = DecryptQueryString(QueryStringConstants.DEPT).ToString();
                MrfCode     = DecryptQueryString(QueryStringConstants.MRFCODE).ToString();

                //get SLA Days for recruiter
                SLADays   = DecryptQueryString(QueryStringConstants.SLADAYS).ToString();
                ProjectId = DecryptQueryString(QueryStringConstants.PROJECTID).ToString();

                hidDepartment.Value = Department;
                hidMrfCode.Value    = MrfCode;


                if (!IsPostBack)
                {
                    if (ProjectId != CommonConstants.SELECT)
                    {
                        //Rakesh : Actual vs Budget 06/06/2016 Begin
                        NPS_Validation objNPS_Validation = Rave.HR.BusinessLayer.MRF.MRFDetail.Is_NIS_NorthgateProject(Convert.ToInt32(ProjectId));

                        if (objNPS_Validation.IsNPS_Project)
                        {
                            trCostCode.Visible = true;
                            Rave.HR.BusinessLayer.Common.Master objMaster = new Rave.HR.BusinessLayer.Common.Master();
                            raveHRCollection = objMaster.FillDropDownsBL(Common.EnumsConstants.Category.CostCode.CastToInt32());
                            ddlCostCode.BindDropdown(raveHRCollection);

                            if (objNPS_Validation.IsDisableValidation)
                            {
                                IsCostCodeValidation          = false;
                                lblCostCodeValidation.Visible = false;
                            }
                            else
                            {
                                IsCostCodeValidation = true;
                            }
                        }
                        else
                        {
                            trCostCode.Visible = false;
                        }
                    }
                    else
                    {
                        trCostCode.Visible = false;
                    }
                    // End


                    //Fill Recritment manager dopdown
                    FillRecruitmentManagerDropDown();

                    //If ProjectName is "SELECT" than disable the ProjectName textbox
                    if (ProjectName != CommonConstants.SELECT)
                    {
                        txtProjectName.Text = ProjectName;
                    }
                    else
                    {
                        txtProjectName.Enabled = false;
                    }

                    //Assign the values from querystring to respective textboxes
                    txtRole.Text       = Role;
                    txtExperience.Text = Experience;
                    txtTargetCTC.Text  = TargetCTC;


                    #region Coded by Sameer For SLA Days

                    //checks if SLA days is null
                    //It is calculating here but in database we are saving calulated date from sp.
                    if (!string.IsNullOrEmpty(SLADays))
                    {
                        txtTargetDate.Text = DateTime.Today.AddDays(double.Parse(SLADays)).ToString(CommonConstants.DATE_FORMAT);
                    }
                    else
                    {
                        //Default SLA Days
                        txtTargetDate.Text = DateTime.Today.AddDays(_defaultSLADays).ToString(CommonConstants.DATE_FORMAT);
                    }

                    #endregion Coded by Sameer For SLA Days

                    // 57877-Venkatesh-  29042016 : Start
                    // Add sai email if while raising headcount for nis projects
                    HfldProjectId.Value = ProjectId;
                    // 57877-Venkatesh-  29042016 : End
                    hidMrfId.Value = MrfId;
                }
                //If Session is not null Means multiple values selected from pending allocation page.
                //If multiple mrf are not selected from pending allocation page
                //then experience should not be visible.

                if (Session[SessionNames.MRFRaiseHeadCOuntGroup] != null)
                {
                    lblExperience.Visible = false;
                    txtExperience.Visible = false;
                }
                else
                {
                    lblExperience.Visible = true;
                    txtExperience.Visible = true;
                }
            }
            //catches RaveHRException exception
            catch (RaveHRException ex)
            {
                LogErrorMessage(ex);
            }
            catch (Exception ex)
            {
                RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME_MRFRAISEHEADCOUNT, "Page_Load", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
                LogErrorMessage(objEx);
            }
        }
    }