Esempio n. 1
0
    private void GetProjectNameNIS()
    {
        try
        {
            AuthorizationManager objRaveHRAuthorizationManager = new AuthorizationManager();
            UserRaveDomainId = objRaveHRAuthorizationManager.getLoggedInUser();
            UserRaveDomainId = UserRaveDomainId.Replace("co.in", "com");

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

            //Declaring Master Class Object
            Rave.HR.BusinessLayer.Employee.Employee employee = new Rave.HR.BusinessLayer.Employee.Employee();

            //Calling Fill dropdown Business layer method to fill
            //the dropdown from Employee Business class.
            raveHrColl = employee.FillProjectNameNISDropDowns(UserRaveDomainId, objParameter.Role);

            ddlProject.Items.Clear();
            ddlProject.DataSource     = raveHrColl;
            ddlProject.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlProject.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlProject.DataBind();
            //ddlProject.Items.Insert(CommonConstants.ZERO, CommonConstants.SELECT);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetConsolidated", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Esempio n. 2
0
 /// <summary>
 /// Manipulates the specified obj qualification details list.
 /// </summary>
 /// <param name="objQualificationDetailsList">The obj qualification details list.</param>
 public void Manipulation(BusinessEntities.RaveHRCollection objCRDetailsCollection)
 {
     try
     {
         //Check for each each entry in CRDetails List
         foreach (BusinessEntities.Contract objAddCRDetails in objCRDetailsCollection)
         {
             if (objAddCRDetails.Mode == "1")
             {
                 this.AddCRDetails(objAddCRDetails);
             }
             if (objAddCRDetails.Mode == "2")
             {
                 this.UpdateCRDetails(objAddCRDetails);
             }
             if (objAddCRDetails.CRId > 0 && objAddCRDetails.Mode == "3")
             {
                 this.DeleteCRDetails(objAddCRDetails);
             }
         }
     }
     catch (RaveHRException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, "Manipulation", EventIDConstants.RAVE_HR_EMPLOYEE_BUSNIESS_LAYER);
     }
 }
Esempio n. 3
0
        //Umesh: NIS-changes: Skill Search Report Starts
        public BusinessEntities.RaveHRCollection GetPrimaryAndSecondarySkills()
        {
            objDA = new DataAccessClass();
            try
            {
                BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();
                objDA.OpenConnection(DBConstants.GetDBConnectionString());
                objDataReader = objDA.ExecuteReaderSP(SPNames.Employee_GetPrimaryAndSecondarySkills);

                while (objDataReader.Read())
                {
                    KeyValue <string> keyValue = new KeyValue <string>();
                    keyValue.KeyName = objDataReader.GetValue(0).ToString();
                    keyValue.Val     = objDataReader.GetValue(0).ToString();
                    raveHRCollection.Add(keyValue);
                }
                return(raveHRCollection);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            finally
            {
                if (objDataReader != null)
                {
                    objDataReader.Close();
                }
                objDA.CloseConncetion();
            }
        }
    /// <summary>
    /// Populate the grid according to sorting criteria.
    /// </summary>
    /// <param name="Mode"></param>
    private void populateGridWithPRojectDetails(int Mode)
    {
        try
        {
            BusinessEntities.ContractProject objGridDetail = new BusinessEntities.ContractProject();
            //Declare contractproject class object.
            Rave.HR.BusinessLayer.Contracts.ContractProject projectDetails = new Rave.HR.BusinessLayer.Contracts.ContractProject();
            BusinessEntities.RaveHRCollection CollectionGridDetail         = new BusinessEntities.RaveHRCollection();
            //Declare list of contractproject class object.
            List <BusinessEntities.ContractProject> objListOfProjects = new List <BusinessEntities.ContractProject>();

            //On pageload get the data with default sorting.
            if (Mode == 1)
            {
                CollectionGridDetail = projectDetails.GetProjectsListDetails(GetCriteriaForPageload());
                for (int i = 0; i < CollectionGridDetail.Count; i++)
                {
                    foreach (List <BusinessEntities.ContractProject> con in CollectionGridDetail)
                    {
                        foreach (BusinessEntities.ContractProject c in con)
                        {
                            objGridDetail = (BusinessEntities.ContractProject)c;
                            objListOfProjects.Add(objGridDetail);
                        }
                    }
                }
            }
            else
            {
                //Get the data with paging & sorting.

                CollectionGridDetail = projectDetails.GetProjectsListDetails(GetCriteriaForPagingAndSorting());

                for (int i = 0; i < CollectionGridDetail.Count; i++)
                {
                    foreach (List <BusinessEntities.ContractProject> con in CollectionGridDetail)
                    {
                        foreach (BusinessEntities.ContractProject c in con)
                        {
                            objGridDetail = (BusinessEntities.ContractProject)c;
                            objListOfProjects.Add(objGridDetail);
                        }
                    }
                }
            }

            //Bind the grid with respective data.
            BindData(objListOfProjects);
        }


        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME_LISTOFPROJECT, "populateGridWithPRojectDetails", EventIDConstants.RAVE_HR_CONTRACT_PRESENTATION_LAYER);
        }
    }
    /// <summary>
    /// Binds The Grid for Filter.
    /// </summary>
    /// <param name="Mode"></param>
    private void BindGrid()
    {
        BusinessEntities.ContractProject objGridDetail = new BusinessEntities.ContractProject();

        if (Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME] != null)
        {
            objGridDetail.ProjectName = Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME].ToString();
        }

        if (Session[SessionNames.CLIENT_NAME] != null)
        {
            objGridDetail.ClientName = Session[SessionNames.CLIENT_NAME].ToString();
        }

        if (Session[SessionNames.STATUS] != null)
        {
            objGridDetail.StatusID = Convert.ToInt32(Session[SessionNames.STATUS].ToString());
        }


        //Declare contractproject class object.
        Rave.HR.BusinessLayer.Contracts.ContractProject projectDetails = new Rave.HR.BusinessLayer.Contracts.ContractProject();
        BusinessEntities.RaveHRCollection CollectionGridDetail         = new BusinessEntities.RaveHRCollection();
        //Declare list of contractproject class object.
        List <BusinessEntities.ContractProject> objListOfProjects = new List <BusinessEntities.ContractProject>();

        objListOfProjects = projectDetails.GetProjectsDetailsForFilter(objGridDetail, GetCriteriaForPageload());

        BindData(objListOfProjects);
    }
    /// <summary>
    /// Gets the master data for the Asset or employee dropdown.
    /// </summary>
    private void GetSectionByBranch(int branchId)
    {
        try
        {
            raveHRCollection = new RaveHRCollection();
            //Invoke the object of business layer to call BusinessLayer method.
            objBLSeatAllocation = new Rave.HR.BusinessLayer.SeatAllocation.SeatAllocation();

            //Get the Branchs of rave.
            raveHRCollection = objBLSeatAllocation.GetSectionByBranch(branchId);

            //Bind the dropdown with data.
            RbListSeatAllocation.DataSource     = raveHRCollection;
            RbListSeatAllocation.DataValueField = SectionId;
            RbListSeatAllocation.DataTextField  = SectionName;
            RbListSeatAllocation.DataBind();
        }

        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);
        }
    }
Esempio n. 7
0
    private void GetMRFCode()
    {
        //Declaring COllection class object
        BusinessEntities.RaveHRCollection raveHrColl = new BusinessEntities.RaveHRCollection();

        //Declaring Master Class Object
        Rave.HR.BusinessLayer.Employee.Employee employee = new Rave.HR.BusinessLayer.Employee.Employee();

        try
        {
            //Calling Fill dropdown Business layer method to fill
            //the dropdown from Employee Business class.
            raveHrColl = employee.FillMRFCodeDropDowns();

            ddlMRFCode.Items.Clear();
            ddlMRFCode.DataSource     = raveHrColl;
            ddlMRFCode.DataTextField  = Common.CommonConstants.DDL_DataTextField;
            ddlMRFCode.DataValueField = Common.CommonConstants.DDL_DataValueField;
            ddlMRFCode.DataBind();
            ddlMRFCode.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, "GetMRFCode", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Esempio n. 8
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);
        }
    }
    private BusinessEntities.RaveHRCollection GetHeadCountReport(string SortExpressionAndDirection)
    {
        BusinessEntities.Projects               project          = new Projects();
        BusinessEntities.RaveHRCollection       raveHRCollection = new BusinessEntities.RaveHRCollection();
        Rave.HR.BusinessLayer.Employee.Employee employeeBL       = new Rave.HR.BusinessLayer.Employee.Employee();
        try
        {
            project.ProjectDivision         = ddlDivision.SelectedValue != "Select" ? Convert.ToInt32(ddlDivision.SelectedValue) : 0;
            project.ProjectBussinessArea    = ddlBusinessArea.SelectedValue != "Select" ? Convert.ToInt32(ddlBusinessArea.SelectedValue) : 0;
            project.ProjectBussinessSegment = ddlBusinessSegment.SelectedValue != "Select" ? Convert.ToInt32(ddlBusinessSegment.SelectedValue) : 0;
            //Siddharth 27 March 2015 Start
            raveHRCollection = employeeBL.GetHeadCountReport(project, SortExpressionAndDirection);
            //Siddharth 27 March 2015 End
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetHeadCountReport", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }

        return(raveHRCollection);
    }
    /// <summary>
    /// Gets the professional details.
    /// </summary>
    /// <returns></returns>
    private BusinessEntities.RaveHRCollection GetVisaDetails(int employeeID)
    {
        Rave.HR.BusinessLayer.Employee.VisaDetails objVisaDetailsBAL;
        BusinessEntities.VisaDetails objVisaDetails;

        // Initialise Collection class object
        BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();

        try
        {
            objVisaDetailsBAL = new Rave.HR.BusinessLayer.Employee.VisaDetails();
            objVisaDetails    = new BusinessEntities.VisaDetails();

            //objVisaDetails.EMPId = 14;
            objVisaDetails.EMPId = employeeID;

            raveHRCollection = objVisaDetailsBAL.GetVisaDetails(objVisaDetails);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetVisaDetails", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }

        return(raveHRCollection);
    }
    /// <summary>
    /// Gets the certification details.
    /// </summary>
    /// <returns></returns>
    private BusinessEntities.RaveHRCollection GetEmployeeResume(int employeeID)
    {
        Rave.HR.BusinessLayer.Employee.EmployeeResume objEmployeeResumeBAL;
        BusinessEntities.EmployeeResume objEmployeeResume;

        // Initialise Collection class object
        BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();

        try
        {
            objEmployeeResumeBAL = new Rave.HR.BusinessLayer.Employee.EmployeeResume();
            objEmployeeResume    = new BusinessEntities.EmployeeResume();

            //objCertificationDetails.EMPId = 14;
            objEmployeeResume.EMPId = employeeID;

            raveHRCollection = objEmployeeResumeBAL.GetEmployeeResumeDetails(objEmployeeResume);
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeeResumeDetails", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }

        return(raveHRCollection);
    }
Esempio n. 12
0
    private void PopulateData()
    {
        try
        {
            Rave.HR.BusinessLayer.MRF.MRFDetail MrfBL   = new Rave.HR.BusinessLayer.MRF.MRFDetail();
            BusinessEntities.RaveHRCollection   collObj = new BusinessEntities.RaveHRCollection();

            string SkillName = string.Empty;
            if (!string.IsNullOrEmpty(txtSkillsName.Text))
            {
                SkillName = txtSkillsName.Text;
            }
            else
            {
                SkillName = "";
            }

            collObj = MrfBL.GetSkillsList(SkillName);


            grdvListofSkill.DataSource = collObj;
            grdvListofSkill.DataBind();
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "PopulateData", EventIDConstants.RAVE_HR_MRF_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
    private void ShowHeaderWhenEmptyGrid(BusinessEntities.RaveHRCollection raveHRCollection)
    {
        try
        {
            //set header visible
            grdvHeadCount.ShowHeader = true;
            // Disable sorting
            grdvHeadCount.AllowSorting = false;

            //Create empty datasource for Grid view and bind
            raveHRCollection.Add(new BusinessEntities.Employee());
            grdvHeadCount.DataSource = raveHRCollection;
            grdvHeadCount.DataBind();

            //clear all the cells in the row
            grdvHeadCount.Rows[0].Cells.Clear();

            //add a new blank cell
            grdvHeadCount.Rows[0].Cells.Add(new TableCell());
            grdvHeadCount.Rows[0].Cells[0].Text  = CommonConstants.NO_RECORDS_FOUND_MESSAGE;
            grdvHeadCount.Rows[0].Cells[0].Wrap  = false;
            grdvHeadCount.Rows[0].Cells[0].Width = Unit.Percentage(10);
        }
        catch
        {
        }
    }
Esempio n. 14
0
        /// <summary>
        /// Deallocate the employee from seat.
        /// </summary>
        /// <returns></returns>
        public List <BusinessEntities.SeatAllocation> UnallocatedEmployee()
        {
            DataAccessClass objDASeatAllocation = new DataAccessClass();
            List <BusinessEntities.SeatAllocation> objListSeatAlloctaion = null;

            // Initialise Collection class object
            raveHRCollection = new BusinessEntities.RaveHRCollection();
            try
            {
                objDASeatAllocation.OpenConnection(DBConstants.GetDBConnectionString());


                //--get result
                DataSet dsSeatDescription = objDASeatAllocation.GetDataSet(SPNames.SeatAllocation_GetUnallocatedEmployee);

                //--Create entities and add to list
                BusinessEntities.SeatAllocation objBESeatDetail = null;
                objListSeatAlloctaion = new List <BusinessEntities.SeatAllocation>();

                foreach (DataRow dr in dsSeatDescription.Tables[0].Rows)
                {
                    objBESeatDetail = new BusinessEntities.SeatAllocation();

                    if (dr[DbTableColumn.Seat_EmployeeID].ToString() != string.Empty)
                    {
                        objBESeatDetail.EmployeeID = Convert.ToInt32(dr[DbTableColumn.Seat_EmployeeID]);
                    }
                    if (dr[DbTableColumn.Seat_EmployeeCode].ToString() != string.Empty)
                    {
                        objBESeatDetail.EmployeeCode = dr[DbTableColumn.Seat_EmployeeCode].ToString();
                    }
                    if (dr[DbTableColumn.Seat_EmployeeName].ToString() != string.Empty)
                    {
                        objBESeatDetail.EmployeeName = dr[DbTableColumn.Seat_EmployeeName].ToString();
                    }
                    if (dr[DbTableColumn.Seat_EMPEmailID].ToString() != string.Empty)
                    {
                        objBESeatDetail.EmployeeEmailID = dr[DbTableColumn.Seat_EMPEmailID].ToString();
                    }

                    //--add to list
                    objListSeatAlloctaion.Add(objBESeatDetail);
                }


                return(objListSeatAlloctaion);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.DataAccessLayer, CLASSNAME, "UnallocatedEmployee", EventIDConstants.RAVE_HR_SEATALLOCATION_DATA_ACCESS_LAYER);
            }
            finally
            {
                objDASeatAllocation.CloseConncetion();
            }
        }
    /// <summary>
    /// Handles the RowDeleting event of the gvVisaDetails control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.Web.UI.WebControls.GridViewDeleteEventArgs"/> instance containing the event data.</param>
    protected void gvVisaDetails_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int deleteRowIndex = 0;
        int rowIndex       = -1;

        BusinessEntities.VisaDetails objVisaDetails = new BusinessEntities.VisaDetails();

        deleteRowIndex = e.RowIndex;

        objVisaDetails      = (BusinessEntities.VisaDetails)VisaDetailsCollection.Item(deleteRowIndex);
        objVisaDetails.Mode = 3;

        if (ViewState[VISADETAILSDELETE] != null)
        {
            BusinessEntities.RaveHRCollection objDeleteVisaDetailsCollection = (BusinessEntities.RaveHRCollection)ViewState[VISADETAILSDELETE];
            objDeleteVisaDetailsCollection.Add(objVisaDetails);

            ViewState[VISADETAILSDELETE] = objDeleteVisaDetailsCollection;
        }
        else
        {
            BusinessEntities.RaveHRCollection objDeleteVisaDetailsCollection1 = new BusinessEntities.RaveHRCollection();

            objDeleteVisaDetailsCollection1.Add(objVisaDetails);

            ViewState[VISADETAILSDELETE] = objDeleteVisaDetailsCollection1;
        }

        VisaDetailsCollection.RemoveAt(deleteRowIndex);

        ViewState[DELETEROWINDEX] = deleteRowIndex;

        DoDataBind();

        if (ViewState[ROWINDEX] != null)
        {
            rowIndex = Convert.ToInt32(ViewState[ROWINDEX].ToString());
            //check edit index with deleted index if edit index is greater than or equal to delete index then rowindex decremented.
            if (rowIndex != -1 && deleteRowIndex <= rowIndex)
            {
                rowIndex--;
                //store the rowindex in viewstate.
                ViewState[ROWINDEX] = rowIndex;
            }

            ImageButton btnImg = (ImageButton)gvVisaDetails.Rows[rowIndex].FindControl(IMGBTNDELETE);
            btnImg.Enabled = false;

            //Disabling all the edit buttons.
            for (int i = 0; i < gvVisaDetails.Rows.Count; i++)
            {
                if (rowIndex != i)
                {
                    ImageButton btnImgEdit = (ImageButton)gvVisaDetails.Rows[i].FindControl(IMGBTNEDIT);
                    btnImgEdit.Enabled = false;
                }
            }
        }
    }
Esempio n. 16
0
    /// <summary>
    /// Gets the skills.
    /// </summary>
    private RaveHRCollection GetSkills()
    {
        Rave.HR.BusinessLayer.Employee.SkillsDetails objSkillTypeBL = new Rave.HR.BusinessLayer.Employee.SkillsDetails();
        BusinessEntities.RaveHRCollection            raveHrColl     = new BusinessEntities.RaveHRCollection();

        raveHrColl = objSkillTypeBL.GetPrimaryAndSecondarySkills();
        return(raveHrColl);
    }
    private void FillDepartment(string role)
    {
        //Declaring COllection class object
        BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();
        DataSet dsDepartment = null;

        Rave.HR.BusinessLayer.FourC.FourC fourCBAL = new Rave.HR.BusinessLayer.FourC.FourC();

        if (role == MasterEnum.FourCRole.RMS_FUNCTIONALMANAGER.ToString())
        {
            dsDepartment = fourCBAL.GetFunctionalManagerDeptName(int.Parse(ViewState["LoginEmpId"].ToString()));
        }
        else
        {
            ////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 from Master class.
            //raveHRCollection = master.FillDepartmentDropDownBL();

            dsDepartment = fourCBAL.GetDepartmentName("");
        }

        if (dsDepartment != null)
        {
            ddlDepartment.Items.Clear();

            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);
            ddlDepartment.Items.Insert(0, new ListItem(CommonConstants.SELECT, CommonConstants.ZERO.ToString()));

            //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()));
        }

        //ddlDepartment.Items.Clear();
        //ddlDepartment.DataSource = raveHRCollection;
        //ddlDepartment.DataTextField = Common.CommonConstants.DDL_DataTextField;
        //ddlDepartment.DataValueField = Common.CommonConstants.DDL_DataValueField;
        //ddlDepartment.DataBind();
        //ddlDepartment.Items.Insert(0, new ListItem(CommonConstants.SELECT, CommonConstants.ZERO.ToString()));
        ////remove the Dept Name called RaveDevelopment from Dropdown -Vandna
        //ddlDepartment.Items.Remove(ddlDepartment.Items.FindByValue(CommonConstants.DeptId_RaveDevelopment.ToString()));
    }
Esempio n. 18
0
    /// <summary>
    /// Fills the Project Name dropdown
    /// </summary>
    private void FillProjectNameDropDown()
    {
        // Initialise Collection class object
        BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();

        // Initialise Business layer object
        Rave.HR.BusinessLayer.MRF.MRFDetail mrfProjectName = new Rave.HR.BusinessLayer.MRF.MRFDetail();
        try
        {
            // Call the Business layer method
            raveHRCollection = mrfProjectName.GetProjectName();

            DataSet dsProject = null;
            Rave.HR.BusinessLayer.FourC.FourC fourCBAL = new Rave.HR.BusinessLayer.FourC.FourC();
            dsProject = fourCBAL.GetProjectNameAddCreatorReviewer();

            if (raveHRCollection != null)
            {
                // Assign the data source to dropdown

                ddlProject.DataSource = dsProject;

                //ddlProject.DataTextField = CommonConstants.DDL_DataTextField;
                //ddlProject.DataValueField = CommonConstants.DDL_DataValueField;
                ddlProject.DataTextField  = dsProject.Tables[0].Columns[1].ToString();
                ddlProject.DataValueField = dsProject.Tables[0].Columns[0].ToString();


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

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


                ddlProjectNameFilter.DataSource     = raveHRCollection;
                ddlProjectNameFilter.DataTextField  = CommonConstants.DDL_DataTextField;
                ddlProjectNameFilter.DataValueField = CommonConstants.DDL_DataValueField;

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

                ddlProjectNameFilter.Enabled = false;
            }
        }
        //catches RaveHRException exception
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            throw new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "FillProjectNameDropDown", EventIDConstants.RAVE_HR_RP_PRESENTATION_LAYER);
        }
    }
Esempio n. 19
0
    private void GetConsolidated(string SortExpressionAndDirection)
    {
        BusinessEntities.Employee               employee         = new BusinessEntities.Employee();
        BusinessEntities.RaveHRCollection       raveHRCollection = new BusinessEntities.RaveHRCollection();
        Rave.HR.BusinessLayer.Employee.Employee employeeBL       = new Rave.HR.BusinessLayer.Employee.Employee();
        try
        {
            DataSet ds = new DataSet();

            ds = employeeBL.GetConsolidated(Convert.ToInt32(ddlProject.SelectedValue), SortExpressionAndDirection);
            GVResourcesOnboard.DataSource = ds.Tables[0];
            Session["GVResourcesOnboard"] = Convert.ToInt32(ds.Tables[0].Rows.Count);
            GVResourcesOnboard.DataBind();

            GVResourcesReleased.DataSource = ds.Tables[1];
            Session["GVResourcesReleased"] = Convert.ToInt32(ds.Tables[1].Rows.Count);
            GVResourcesReleased.DataBind();
            if (ds != null)
            {
                if (ds.Tables[0].Rows.Count == 0 || ds.Tables[0].Rows.Count == 0)
                {
                    btnExport.Visible = false;
                }
                else
                {
                    btnExport.Visible = true;
                }

                if (ds.Tables[0].Rows.Count == 0)
                {
                    TROnBoard.Visible = false;
                }
                else
                {
                    TROnBoard.Visible = true;
                }

                if (ds.Tables[1].Rows.Count == 0)
                {
                    TRRelease.Visible = false;
                }
                else
                {
                    TRRelease.Visible = true;
                }
            }
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetConsolidated", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Esempio n. 20
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);
        }
    }
Esempio n. 21
0
        public void SendEmailForProjectClosed(BusinessEntities.Projects objProjectDetails)
        {
            try
            {
                BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection();
                string projectManagerEmail  = string.Empty;
                string strProjectStatus     = string.Empty;
                string strProjectStatusFlag = objProjectDetails.ProjectStatus;
                string sComp = Utility.GetUrl();
                string strProjectSummaryLink = sComp + CommonConstants.PROJECTSUMMARY_PAGE;

                //Get ProjectManager Name

                raveHRCollection = DataAccessLayer.Projects.Projects.GetProjectManagerByProjectId(objProjectDetails);

                foreach (BusinessEntities.Projects objProj in raveHRCollection)
                {
                    projectManagerEmail += objProj.EmailIdOfPM;
                    //projectManagerEmail += ",";
                    objProjectDetails.EmailIdOfPM = projectManagerEmail;

                    if (objProjectDetails.EmailIdOfPM.EndsWith(","))
                    {
                        objProjectDetails.EmailIdOfPM = objProjectDetails.EmailIdOfPM.Substring(0, objProjectDetails.EmailIdOfPM.Length - 1);
                    }
                }



                IRMSEmail obj = new RMSEmail(Convert.ToInt16(EnumsConstants.RMSModule.Projects),
                                             Convert.ToInt16(EnumsConstants.EmailFunctionality.DeletedProject));

                obj.To.Add(objProjectDetails.EmailIdOfPM);

                obj.Subject = string.Format(obj.Subject, objProjectDetails.ProjectCode,
                                            objProjectDetails.ClientName,
                                            objProjectDetails.ProjectName);
                obj.Body = string.Format(obj.Body, objProjectDetails.ProjectName,
                                         objProjectDetails.ClientName,
                                         GetHTMLForProjectClosed(objProjectDetails),
                                         strProjectSummaryLink);

                obj.SendEmail(obj);
            }

            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, SEND_MAIL_CLOSED_PROJECT, EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_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);
    }
Esempio n. 23
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);
    }
Esempio n. 24
0
 //Siddhesh Arekar Issue ID : 55884 Closure Type
 /// <summary>
 /// Get Master Type Details
 /// </summary>
 /// <param name="category"></param>
 /// <returns>string</returns>
 public KeyValue <string> GetMasterTypeDetails(int categoryId, string key)
 {
     try
     {
         BusinessEntities.RaveHRCollection     raveHRCollection = new BusinessEntities.RaveHRCollection();
         Rave.HR.DataAccessLayer.Common.Master master           = new Rave.HR.DataAccessLayer.Common.Master();
         return(master.GetMasterTypeDetails(categoryId, key));
     }
     catch (RaveHRException ex)
     {
         throw ex;
     }
 }
Esempio n. 25
0
        /// <summary>
        /// get the branches of a section.
        /// </summary>
        /// <param name="branchID"></param>
        /// <returns></returns>
        public RaveHRCollection GetSectionByBranch(int branchID)
        {
            BusinessEntities.SeatAllocation objSeatAllocation = null;
            SqlDataReader   objReader           = null;;
            DataAccessClass objDASeatAllocation = new DataAccessClass();

            try
            {
                raveHRCollection = new RaveHRCollection();
                objDASeatAllocation.OpenConnection(DBConstants.GetDBConnectionString());

                SqlParameter[] sqlParam = new SqlParameter[1];
                sqlParam[0]       = new SqlParameter(SPParameter.BranchID, DbType.Int32);
                sqlParam[0].Value = branchID;

                objReader = objDASeatAllocation.ExecuteReaderSP(SPNames.SeatAllocation_GetSection, sqlParam);

                while (objReader.Read())
                {
                    objSeatAllocation             = new BusinessEntities.SeatAllocation();
                    objSeatAllocation.SectionID   = int.Parse(objReader[DbTableColumn.Seat_SectionID].ToString());
                    objSeatAllocation.SectionName = objReader[DbTableColumn.Seat_SectionName].ToString();
                    raveHRCollection.Add(objSeatAllocation);
                }

                return(raveHRCollection);
            }
            //catches RaveHRException exception
            catch (RaveHRException ex)
            {
                throw ex;
            }
            //catches genral exception
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.DataAccessLayer, CLASSNAME, "GetSectionByBranch", EventIDConstants.RAVE_HR_SEATALLOCATION_DATA_ACCESS_LAYER);
            }
            //close datareader and connection
            finally
            {
                //checks if datareader is null
                if (!objReader.IsClosed)
                {
                    //close datareader
                    objReader.Close();
                }

                //close connection
                objDASeatAllocation.CloseConncetion();
            }
        }
Esempio n. 26
0
    private void PopulateData()
    {
        try
        {
            Rave.HR.BusinessLayer.Employee.Employee empBL   = new Rave.HR.BusinessLayer.Employee.Employee();
            BusinessEntities.RaveHRCollection       collObj = new BusinessEntities.RaveHRCollection();


            //Aarohi : Issue 28572(CR) : 05/01/2012 : Start
            //Commented the below line of code to add a new parameter for employeeId
            //commented for 4C report
            //collObj = empBL.GetEmployeesList(txtResourceName.Text.Trim());



            //if (hidEMPId.Text != null || hidEMPId.Text == string.Empty || hidEMPId.Text == "")
            //if (hidEMPId.Text != null && hidEMPId.Text != string.Empty || hidEMPId.Text != "")
            //{
            //    collObj = empBL.GetEmployeeListForFMRM(txtResourceName.Text.Trim(), hidEMPId.Text);
            //}
            //else
            //{
            //    collObj = empBL.GetEmployeesList(txtResourceName.Text.Trim());
            //}
            //Aarohi : Issue 28572(CR) : 05/01/2012 : End


            //CASES to show employee
            //First to show all sub-ordinate
            if (DecryptQueryString("VIEW") != null && !string.IsNullOrEmpty(DecryptQueryString("VIEW")))
            {
                collObj = empBL.GetEmployeesView(DecryptQueryString("VIEW"), int.Parse(DecryptQueryString("EmpId")), txtResourceName.Text.Trim());
            }
            else
            {
                collObj = empBL.GetEmployeesList(txtResourceName.Text.Trim());
            }

            grdvListofEmployees.DataSource = collObj;
            grdvListofEmployees.DataBind();
        }
        catch (RaveHRException ex)
        {
            LogErrorMessage(ex);
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "PopulateData", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Esempio n. 27
0
        //Ishwar Patil : Trainging Module 29/04/2014 : End

        // Ishwar NISRMS 13032015 Start
        public BusinessEntities.RaveHRCollection FillDropDownsBLForStatus(int categoryId)
        {
            try
            {
                BusinessEntities.RaveHRCollection     raveHRCollection = new BusinessEntities.RaveHRCollection();
                Rave.HR.DataAccessLayer.Common.Master master           = new Rave.HR.DataAccessLayer.Common.Master();
                raveHRCollection = master.FillDropDownsDLForStatus(categoryId);
                return(raveHRCollection);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
        }
Esempio n. 28
0
    //Siddharth 27 March 2015 Start
    private DataTable GetSkillSearchDetails(string SortExpressionAndDirection)
    {
        Rave.HR.BusinessLayer.Employee.SkillsDetails objSkillsDetailsBAL = new Rave.HR.BusinessLayer.Employee.SkillsDetails();
        BusinessEntities.RaveHRCollection            raveHRCollection    = new BusinessEntities.RaveHRCollection();

        try
        {
            //Add selected items in collection
            IList <string> MandatorySkills = new List <string>();
            IList <string> OptionalSkills  = new List <string>();

            for (int i = 0; i < gvSkillCriteria.Rows.Count; i++)
            {
                DropDownList    ddlSkill             = (DropDownList)gvSkillCriteria.Rows[i].FindControl("ddlSkill");
                RadioButtonList rblMandatoryOptional = (RadioButtonList)gvSkillCriteria.Rows[i].FindControl("rblMandatoryOptional");

                if (rblMandatoryOptional.SelectedValue == "0")
                {
                    if (Convert.ToString(ddlSkill.SelectedValue) != CommonConstants.SELECT)
                    {
                        MandatorySkills.Add(ddlSkill.SelectedValue);
                    }
                }
                else
                {
                    if (Convert.ToString(ddlSkill.SelectedValue) != CommonConstants.SELECT)
                    {
                        OptionalSkills.Add(ddlSkill.SelectedValue);
                    }
                }
            }

            string commaSeparatedMandatorySkills = String.Join(",", MandatorySkills.ToArray());
            string commadSepratedOptionalSkills  = String.Join(",", OptionalSkills.ToArray());

            dt = new DataTable();
            dt = objSkillsDetailsBAL.GetSkillSearchDetails(commaSeparatedMandatorySkills, commadSepratedOptionalSkills, SortExpressionAndDirection);
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetEmployeeSummary", EventIDConstants.RAVE_EMP_SKILL_SEARCH_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }

        return(dt);
    }
    //Siddharth 26 March 2015 Start
    private void SortGridView(string sortExpression, string direction)
    {
        try
        {
            sortExpression = "[" + sortExpression + "]";
            if (sortExpression == CommonConstants.EMP_FIRSTNAME)
            {
                objParameter.SortExpressionAndDirection = sortExpression + direction;
            }
            else
            {
                objParameter.SortExpressionAndDirection = sortExpression + direction;
            }

            //This will call the bind function and pass sort details
            raveHRCollection = GetHeadCountReport(objParameter.SortExpressionAndDirection);

            if (raveHRCollection.Count == 0)
            {
                grdvHeadCount.DataSource   = raveHRCollection;
                Session["HeadCountReport"] = raveHRCollection.Count;
                grdvHeadCount.DataBind();

                ShowHeaderWhenEmptyGrid(raveHRCollection);
                //Siddharth 30 April 2015 Start - Clear the Session
                Session[SessionNames.PREVIOUS_SORT_EXPRESSION_EMP] = null;
                Session[SessionNames.SORT_DIRECTION_EMP]           = null;
                //Siddharth 30 April 2015 End
                btnExport.Visible = false;
            }
            else
            {
                grdvHeadCount.AllowSorting = true;
                grdvHeadCount.DataSource   = raveHRCollection;
                grdvHeadCount.DataBind();
                btnExport.Visible = true;
            }
        }

        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "SortGridView", EventIDConstants.RAVE_HR_EMPLOYEE_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
    }
Esempio n. 30
0
    private void FillEmployeeGrid()
    {
        //Calling Fill dropdown Business layer method to fill the dropdown
        raveHRCollection = mRFDetail.GetEmployeeBL();

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

            //Bind Dropdown
            gvPopUp.DataBind();
        }
    }