Exemplo n.º 1
0
        public List <BusinessEntities.Master> GetMasterData(string strCategory)
        {
            try
            {
                Rave.HR.DataAccessLayer.Projects.RaveHRMaster objDropDownDAL = new Rave.HR.DataAccessLayer.Projects.RaveHRMaster();
                DataTable dtDropDown = new DataTable();
                dtDropDown = objDropDownDAL.FillDropDownList(strCategory);


                List <BusinessEntities.Master> objListDropDown = new List <BusinessEntities.Master>();
                BusinessEntities.Master        objRaveHRMaster = null;
                foreach (DataRow drProjectDetails in dtDropDown.Rows)
                {
                    objRaveHRMaster            = new BusinessEntities.Master();
                    objRaveHRMaster.MasterId   = int.Parse(drProjectDetails["MasterID"].ToString());
                    objRaveHRMaster.MasterName = drProjectDetails["MasterName"].ToString();
                    objListDropDown.Add(objRaveHRMaster);
                }
                return(objListDropDown);
            }

            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRMaster.cs", "GetMasterData", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER);
            }
            finally
            {
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets master data such as ProjectStatus, MRFStatus etc.
        /// </summary>
        /// <returns>List</returns>
        public List <BusinessEntities.Master> GetMasterData(string Category)
        {
            try
            {
                Rave.HR.DataAccessLayer.Common.Master masterData = new Rave.HR.DataAccessLayer.Common.Master();
                DataTable dtMasterData = new DataTable();
                dtMasterData = masterData.FillDropDownList(Category);

                List <BusinessEntities.Master> listMasterData  = new List <BusinessEntities.Master>();
                BusinessEntities.Master        fetchMasterData = null;
                foreach (DataRow drMasterData in dtMasterData.Rows)
                {
                    fetchMasterData            = new BusinessEntities.Master();
                    fetchMasterData.MasterId   = int.Parse(drMasterData["MasterID"].ToString());
                    fetchMasterData.MasterName = drMasterData["MasterName"].ToString();
                    listMasterData.Add(fetchMasterData);
                }
                return(listMasterData);
            }

            catch (RaveHRException ex)
            {
                throw ex;
            }

            catch (Exception ex)
            {
                throw ex;
                //throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRMaster.cs", "GetMasterData");
            }
        }
Exemplo n.º 3
0
    /// <summary>
    /// Returns Project Summary data for GridView
    /// </summary>
    /// <returns>List</returns>
    private List <BusinessEntities.Projects> GetProjectSummaryData(bool setPageing)
    {
        if (grdvListofProjects.BottomPagerRow != null)
        {
            GridViewRow gvrPager = grdvListofProjects.BottomPagerRow;
            TextBox     txtPages = (TextBox)gvrPager.Cells[0].FindControl("txtPages");
            if (txtPages.Text != "" && int.Parse(txtPages.Text) != 0 && Convert.ToInt32(txtPages.Text) <= Convert.ToInt32(Session[sessionPageCount].ToString()))
            {
                objProjectCriteria.PageNumber = int.Parse(txtPages.Text);
            }
        }
        else
        {
            objProjectCriteria.PageNumber = Convert.ToInt32(Session[SessionNames.CURRENT_PAGE_INDEX_PROJECT].ToString());
        }

        //checks if PageNumber=0 then assign 1 to it
        if (objProjectCriteria.PageNumber == 0)
        {
            objProjectCriteria.PageNumber = 1;
        }

        Rave.HR.BusinessLayer.Projects.Projects objProjectSummaryBAL = new Rave.HR.BusinessLayer.Projects.Projects();

        BusinessEntities.Master   objGetProjectStatus  = new BusinessEntities.Master();
        BusinessEntities.Projects objGetProjectSummary = new BusinessEntities.Projects();

        List <BusinessEntities.Projects> objListProjectSummary = new List <BusinessEntities.Projects>();

        try
        {
            if (Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME] == null || Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME].ToString() == string.Empty)
            {
                objGetProjectSummary.ProjectName = null;
            }
            else
            {
                objGetProjectSummary.ProjectName = Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME].ToString();
            }
            if (Session[SessionNames.CLIENT_NAME] == null || Session[SessionNames.CLIENT_NAME].ToString() == SELECT)
            {
                objGetProjectSummary.ClientName = null;
            }
            else
            {
                objGetProjectSummary.ClientName = Session[SessionNames.CLIENT_NAME].ToString();
            }
            if ((objProjectCriteria.RolePM == AuthorizationManagerConstants.ROLEPROJECTMANAGER) || (objProjectCriteria.RoleRPM == AuthorizationManagerConstants.ROLERPM) || (objProjectCriteria.RoleCOO == AuthorizationManagerConstants.ROLECOO))
            {
                if (Session[SessionNames.PROJECT_STATUS] == null || Session[SessionNames.PROJECT_STATUS].ToString() == SELECT)
                {
                    objGetProjectStatus.MasterId = 0;
                }
                else
                {
                    objGetProjectStatus.MasterId = Convert.ToInt32(Session[SessionNames.PROJECT_STATUS].ToString());
                }
            }
            else
            {
                objGetProjectStatus.MasterId = 0;
            }

            //If any of the session is null or Contains text "Select" get the page load data

            if ((Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME] == null || Session[SessionNames.PROJECT_SUMMARY_PROJECT_NAME].ToString() == string.Empty) && (Session[SessionNames.CLIENT_NAME] == null || Session[SessionNames.CLIENT_NAME].ToString() == SELECT) && (Session[SessionNames.PROJECT_STATUS] == null || Session[SessionNames.PROJECT_STATUS].ToString() == SELECT))
            {
                objListProjectSummary = objProjectSummaryBAL.GetProjectSummaryForPageLoad(objProjectCriteria, PAGE_SIZE, ref pageCount, setPageing);
            }
            //Else get the filtered data based upon filter critera selection
            else
            {
                objListProjectSummary = objProjectSummaryBAL.GetProjectSummaryForFilter(objGetProjectSummary, objGetProjectStatus, objProjectCriteria, PAGE_SIZE, ref pageCount, setPageing);
            }
            Session[sessionPageCount] = pageCount;
        }
        catch (RaveHRException ex)
        {
            throw ex;
        }
        catch (Exception ex)
        {
            RaveHRException objEx = new RaveHRException(ex.Message, ex, Sources.PresentationLayer, CLASS_NAME, "GetDataProjectSummaryApplyFilter", EventIDConstants.RAVE_HR_PROJECTS_PRESENTATION_LAYER);
            LogErrorMessage(objEx);
        }
        return(objListProjectSummary);
    }
Exemplo n.º 4
0
        public DataTable GetFilteredProjectSummaryList(BusinessEntities.Projects objGetProjectSummary, BusinessEntities.Master objGetProjectStatus, string UserMailId, string COORole, string PresalesRole, string PMRole, string RPMRole)
        {
            Rave.HR.DataAccessLayer.Projects.Projects objGetProjectSummaryDAL = new Rave.HR.DataAccessLayer.Projects.Projects();
            DataSet   dsProjectSummary = new DataSet();
            DataTable dt = new DataTable();

            try
            {
                dsProjectSummary = objGetProjectSummaryDAL.GetProjectSummaryForFilter(objGetProjectSummary, objGetProjectStatus, UserMailId, COORole, PresalesRole, PMRole, RPMRole);
                dt = dsProjectSummary.Tables[0];
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "GetFilteredProjectSummaryList", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER);
            }
            return(dt);
        }
Exemplo n.º 5
0
        public List <BusinessEntities.Projects> GetProjectSummaryForFilter(BusinessEntities.Projects objGetProjectSummary, BusinessEntities.Master objGetProjectStatus, BusinessEntities.ProjectCriteria objProjectCriteria, int pageSize, ref int pageCount, bool setPageing)
        {
            List <BusinessEntities.Projects> objProjectSummary = new List <BusinessEntities.Projects>();

            try
            {
                Rave.HR.DataAccessLayer.Projects.Projects objGetProjectSummaryDAL = new Rave.HR.DataAccessLayer.Projects.Projects();
                objProjectSummary = objGetProjectSummaryDAL.GetProjectSummaryForFilter(objGetProjectSummary, objGetProjectStatus, objProjectCriteria, pageSize, ref pageCount, setPageing);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "GetProjectSummaryForFilter", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER);
            }
            return(objProjectSummary);
        }