/// <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);
        }
    }
    /// <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);
        }
    }
    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);
        }
    }
    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);
        }
    }
Example #5
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);
        }
    }
Example #6
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);
        }
    }
    //43639--Jignyasa--Start
    //private bool CheckIfFunctionalManager(ArrayList ArrRoles)
    //{
    //    AuthorizationManager authorizationManager = new AuthorizationManager();
    //    bool functionalManager = authorizationManager.CheckIfFunctionalManager();

    //    Session["IsFunctionalManager"] = functionalManager;

    //    if (functionalManager && !ArrRoles.Contains(AuthorizationManagerConstants.ROLEPROJECTMANAGER))
    //    {
    //        return true;
    //    }
    //    else
    //    {
    //        return false;
    //    }
    //}
    //43639--Jignyasa--End


    //43639--Jignyasa--End

    //Ishwar Patil : Trainging Module 12/05/2014 : Starts
    private void AccessTrainingModule()
    {
        int    AccessRightID = 0;
        string UserMailId;
        int    UserEmpID;
        AuthorizationManager authoriseduser = new AuthorizationManager();

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

        UserMailId = authoriseduser.getLoggedInUserEmailId();
        UserEmpID  = objRaveHRMasterBAL.GetLoggedInUserID(UserMailId);

        AccessRightID = saveTrainingBL.AccessForTrainingModule(UserEmpID);

        if (AccessRightID == CommonConstants.DefaultFlagMinus)
        {
            //spanRaiseTraining.Visible = true;
            //spanRaiseTrainingSummary.Visible = true;
            //spanApprovRejectRequest.Visible = true;
            tabTraining.Visible = true;

            //spanTrainingModule.Visible = true;
        }
        else
        {
            bool ShowTrainingMenu = Convert.ToBoolean(ConfigurationSettings.AppSettings[CommonConstants.ShowTrainingMenu]);
            if (ShowTrainingMenu)
            {
                tabTraining.Visible = true;
            }
        }
        //else
        //{
        //    if (AccessRightID == CommonConstants.DefaultFlagZero)
        //    {
        //        spanRaiseTraining.Visible = false;
        //        spanRaiseTrainingSummary.Visible = false;
        //        spanApprovRejectRequest.Visible = false;
        //        tabTraining.Visible = false;
        //    }
        //    else
        //    {
        //        spanRaiseTraining.Visible = true;
        //        spanRaiseTrainingSummary.Visible = true;
        //        tabTraining.Visible = true;
        //        //For Approve Reject screen only
        //        if (CommonConstants.ApproveRejectID == UserEmpID)
        //        {
        //            spanApprovRejectRequest.Visible = true;
        //        }
        //        else
        //        {
        //            spanApprovRejectRequest.Visible = false;
        //        }
        //    }
        //}
    }
    /// <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);
        }
    }
    /// <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);
    }
Example #10
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);
    }
    private void GetEmployeeDesignations(int categoryID)
    {
        Rave.HR.BusinessLayer.Common.Master     master     = new Rave.HR.BusinessLayer.Common.Master();
        BusinessEntities.RaveHRCollection       raveHrColl = new BusinessEntities.RaveHRCollection();
        Rave.HR.BusinessLayer.Employee.Employee employeeBL = new Rave.HR.BusinessLayer.Employee.Employee();

        raveHrColl = employeeBL.GetEmployeesDesignations(categoryID);

        ddlDesignation.Items.Clear();
        ddlDesignation.DataSource     = raveHrColl;
        ddlDesignation.DataTextField  = Common.CommonConstants.DDL_DataTextField;
        ddlDesignation.DataValueField = Common.CommonConstants.DDL_DataValueField;
        ddlDesignation.DataBind();
        ddlDesignation.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);
    }
Example #13
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);
 }
Example #14
0
    /// <summary>
    /// Added by Kanchan for the requirment specified in the Discussion with Sawita Kamath and Gaurav Thakkar.
    /// Requirment raised:When a mrf is approved the approval mail should go to the reporting to.
    /// Give the emailId for the employee whose Employee id is supplied.
    /// </summary>
    /// <param name="empID"></param>
    /// <returns></returns>
    private string getMailID(int empID)
    {
        string ReportingToMailID = string.Empty;

        try
        {
            Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();
            ReportingToMailID = master.GetEmailID(empID);
            return(ReportingToMailID);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME_MRFPENDINGAPPROVAL, "getMailID", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }
    private void GetEmployeeDepartment()
    {
        //Declaring COllection class object
        BusinessEntities.RaveHRCollection raveHRCollection = 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.
            raveHRCollection = master.FillDepartmentDropDownBL();

            ddlDepartment.Items.Clear();
            ddlDepartment.DataSource     = raveHRCollection;
            ddlDepartment.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlDepartment.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlDepartment.DataBind();
            ddlDepartment.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);

            //remove the Dept Name called RaveDevelopment from Dropdown -Vandna
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_RaveDevelopment.ToString()));

            // 36837-Ambar-Start-28082012
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_PRESALES_INDIA.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_PRESALES_UK.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_PRESALES_USA.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_RaveForecastedProject.ToString()));
            // 36837-Ambar-End
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeeDepartment", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
    /// <summary>
    /// Function will Fill Dropdowns of all the Master Data
    /// </summary>
    private void FillDropDowns()
    {
        try
        {
            //Declaring Master Class Object
            Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();

            //Calling Fill dropdown Business layer method to fill the dropdown
            raveHRCollection = master.FillDepartmentDropDownBL();

            //Check Collection object is null or not
            if (raveHRCollection != null)
            {
                //Assign DataSource to dropdown
                ddlDepartment.DataSource = raveHRCollection;

                //Assign DataText Field to dropdown
                ddlDepartment.DataTextField = CommonConstants.DDL_DataTextField;

                //Assign Data Value field to dropdown
                ddlDepartment.DataValueField = CommonConstants.DDL_DataValueField;

                //Bind Dropdown
                ddlDepartment.DataBind();

                //Insert Select as a Item for Dropdown
                ddlDepartment.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, "FillDropDowns", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }
Example #17
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);
        }
    }
Example #18
0
    //Rakesh : 18/05/2016 Begin
    void BindDepartmentDropdown()
    {
        Rave.HR.BusinessLayer.Common.Master master = new Rave.HR.BusinessLayer.Common.Master();
        try
        {  // Initialise Collection class object
            BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();

            // Initialise Business layer object


            // Call the Business layer method
            raveHRCollection = master.FillDepartmentDropDownBL();

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

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

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

                // Default value of dropdown is "Select"
                ddlDepartment.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, "FillDropDown", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
        }
    }
Example #19
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);
            }
        }
    }
Example #20
0
    protected void grdvCreatorApprover_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        lblMessage.Visible = false;



        if (e.CommandName == "Edt")
        {
            GridViewRow row            = (GridViewRow)((Control)e.CommandSource).NamingContainer;
            HiddenField HfProjectId    = (HiddenField)row.FindControl("hfProjectId");
            HiddenField HfDepartmentId = (HiddenField)row.FindControl("HfDepartmentId");
            HiddenField HfCreatorGrd   = (HiddenField)row.FindControl("HfCreatorGrd");
            HiddenField HfReviewerGrd  = (HiddenField)row.FindControl("HfReviewerGrd");

            btnAdd.Enabled    = false;
            btnUpdate.Enabled = true;

            HfCreator.Value  = HfCreatorGrd.Value;
            HfReviewer.Value = HfReviewerGrd.Value;

            txtCreator.Text  = row.Cells[2].Text;
            txtReviewer.Text = row.Cells[3].Text;

            //Declaring COllection class object
            BusinessEntities.RaveHRCollection   raveHRCollection = new BusinessEntities.RaveHRCollection();
            Rave.HR.BusinessLayer.Common.Master master           = new Rave.HR.BusinessLayer.Common.Master();
            raveHRCollection = master.FillDepartmentDropDownBL();

            ddlDepartment.Items.Clear();
            ddlDepartment.DataSource     = raveHRCollection;
            ddlDepartment.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlDepartment.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlDepartment.DataBind();
            ddlDepartment.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);


            ddlDepartment.SelectedValue = HfDepartmentId.Value;

            if (HfDepartmentId.Value == "1")
            {
                ddlProject.Enabled = true;

                Rave.HR.BusinessLayer.MRF.MRFDetail mrfProjectName = new Rave.HR.BusinessLayer.MRF.MRFDetail();
                raveHRCollection = mrfProjectName.GetProjectName();

                ddlProject.Items.Clear();
                ddlProject.DataSource     = raveHRCollection;
                ddlProject.DataTextField  = CommonConstants.DDL_DataTextField;
                ddlProject.DataValueField = CommonConstants.DDL_DataValueField;

                // Bind the data to dropdown
                ddlProject.DataBind();
                // Default value of dropdown is "Select"
                ddlProject.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);


                if (!string.IsNullOrEmpty(HfProjectId.Value))
                {
                    ddlProject.SelectedValue = HfProjectId.Value;
                }
            }
            else
            {
                ddlProject.SelectedItem.Text = "SELECT";
            }

            ddlDepartment.Enabled = false;
            ddlProject.Enabled    = false;
        }
        else if (e.CommandName == "Del")
        {
            try
            {
                if (rblAdminSelectionOption.SelectedIndex == 0)
                {
                    GridViewRow row            = (GridViewRow)((Control)e.CommandSource).NamingContainer;
                    HiddenField HfProjectId    = (HiddenField)row.FindControl("hfProjectId");
                    HiddenField HfDepartmentId = (HiddenField)row.FindControl("HfDepartmentId");
                    HiddenField HfCreatorGrd   = (HiddenField)row.FindControl("HfCreatorGrd");
                    HiddenField HfReviewerGrd  = (HiddenField)row.FindControl("HfReviewerGrd");


                    Rave.HR.BusinessLayer.FourC.FourC fourCBAL = new Rave.HR.BusinessLayer.FourC.FourC();
                    int depId  = int.Parse(HfDepartmentId.Value);
                    int projId = 0;

                    if (depId == 1)
                    {
                        projId = int.Parse(HfProjectId.Value);
                    }


                    fourCBAL.AddUpdateDeleteCreatorReviewer(depId, projId, HfCreator.Value, HfReviewer.Value, UserMailId, "Delete");
                    FillCreatorApproverData();

                    ClearControl();

                    lblMessage.Visible        = true;
                    lblMessage.Text           = "Data Deleted Successfully!!!.";
                    lblMessage.Style["color"] = "blue";
                }
                else
                {
                    GridViewRow   row          = (GridViewRow)((Control)e.CommandSource).NamingContainer;
                    HiddenField   HfCreatorGrd = (HiddenField)row.FindControl("HfCreatorGrd");
                    List <string> ls           = new List <string> {
                    };
                    ls.Add(HfCreatorGrd.Value);

                    if (ls.Count > 0 && !string.IsNullOrEmpty(HfCreatorGrd.Value))
                    {
                        Rave.HR.BusinessLayer.FourC.FourC fourCBAL = new Rave.HR.BusinessLayer.FourC.FourC();
                        fourCBAL.AddDeleteViewAccessRights(ls, UserMailId, "Delete");

                        getEmployeeData();

                        lblMessage.Visible        = true;
                        lblMessage.Text           = "Data Added Successfully!!!.";
                        lblMessage.Style["color"] = "blue";
                    }
                }
            }
            catch (RaveHRException ex)
            {
                LogErrorMessage(ex);
            }
            catch (Exception ex)
            {
                RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "grdvCreatorApprover_RowCommand", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
                LogErrorMessage(objEx);
            }
        }
    }
Example #21
0
    private void GetEmployeeDepartment()
    {
        //Declaring COllection class object
        BusinessEntities.RaveHRCollection raveHRCollection = 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.
            raveHRCollection = master.FillDepartmentDropDownBL();

            DataSet dsDepartment = null;
            Rave.HR.BusinessLayer.FourC.FourC fourCBAL = new Rave.HR.BusinessLayer.FourC.FourC();
            dsDepartment = fourCBAL.GetDepartmentForCreatorApprover();

            ddlDepartment.Items.Clear();
            //ddlDepartment.DataSource = raveHRCollection;
            //ddlDepartment.DataTextField = Common.CommonConstants.DDL_DataTextField;
            //ddlDepartment.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlDepartment.DataSource     = dsDepartment;
            ddlDepartment.DataTextField  = dsDepartment.Tables[0].Columns[1].ToString();
            ddlDepartment.DataValueField = dsDepartment.Tables[0].Columns[0].ToString();
            ddlDepartment.DataBind();
            ddlDepartment.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);

            //remove the Dept Name
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_RaveDevelopment.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.PRESALES_USA.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.PRESALES_UK.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.PRESALES_INDIA.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.RAVECONSULTANT_USA.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.RAVECONSULTANT_UK.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.RAVEFORCASTEDPROJECT.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.SALES_DEPARTMENT.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.Senior_Mgt_DEPARTMENT.ToString()));
            ddlDepartment.Items.Remove(ddlDepartment.Items.FindByText(CommonConstants.Project_Mentee2010_DEPARTMENT.ToString()));

            ddlDepartmentFilter.DataSource     = raveHRCollection;
            ddlDepartmentFilter.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlDepartmentFilter.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlDepartmentFilter.DataBind();
            ddlDepartmentFilter.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);

            //remove the Dept Name
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByValue(CommonConstants.DeptId_RaveDevelopment.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.PRESALES_USA.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.PRESALES_UK.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.PRESALES_INDIA.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.RAVECONSULTANT_USA.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.RAVECONSULTANT_UK.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.RAVEFORCASTEDPROJECT.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.SALES_DEPARTMENT.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.Senior_Mgt_DEPARTMENT.ToString()));
            ddlDepartmentFilter.Items.Remove(ddlDepartmentFilter.Items.FindByText(CommonConstants.Project_Mentee2010_DEPARTMENT.ToString()));

            ddlDepartment.Enabled = true;
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeeDepartment", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }