/// <summary> /// Gets the Sub Domain based upon selected Domain /// </summary> /// <param name="domainId">int</param> /// <returns>List</returns> public List <SubDomain> GetSubDomain(int domainId) { List <BusinessEntities.SubDomain> lstSubDomain = null; try { Rave.HR.DataAccessLayer.Projects.Projects objSubDomainDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); DataTable dtSubDomain = new DataTable(); dtSubDomain = objSubDomainDAL.GetSubDomain(domainId); lstSubDomain = new List <BusinessEntities.SubDomain>(); BusinessEntities.SubDomain objSubDomain = null; foreach (DataRow drSubDomain in dtSubDomain.Rows) { objSubDomain = new BusinessEntities.SubDomain(); objSubDomain.SubDomainName = drSubDomain["SubDomainName"].ToString(); objSubDomain.SubDomainId = int.Parse(drSubDomain["ID"].ToString()); lstSubDomain.Add(objSubDomain); } } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "GetCheckedDomainName", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } return(lstSubDomain); }
public List <Technology> Technology(int CategoryID) { List <BusinessEntities.Technology> lstTechnology = new List <BusinessEntities.Technology>(); try { Rave.HR.DataAccessLayer.Projects.Projects objTechnologyDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); DataTable dtTechnology = new DataTable(); dtTechnology = objTechnologyDAL.Technology(CategoryID); BusinessEntities.Technology objTechnology = null; foreach (DataRow drTechnology in dtTechnology.Rows) { objTechnology = new BusinessEntities.Technology(0, null, CategoryID); objTechnology.TechnolgoyName = drTechnology["TechnologyName"].ToString(); objTechnology.TechnologyID = int.Parse(drTechnology["ID"].ToString()); lstTechnology.Add(objTechnology); } //return lstTechnology; } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "Technology", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } return(lstTechnology); }
public DataTable GetUnFilteredApproveRejectProjectList() { Rave.HR.DataAccessLayer.Projects.Projects objApproveRejectProjectDAL; DataSet dsApproveRejectProject; DataTable dt = new DataTable(); try { objApproveRejectProjectDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); dsApproveRejectProject = new DataSet(); dsApproveRejectProject = objApproveRejectProjectDAL.GetPendingApprovalAndRejectedProjects(); dt = dsApproveRejectProject.Tables[0]; } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRProjects.cs", "GetUnFilteredApproveRejectProject", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } return(dt); }
public DataTable GetUnfilteredProjectSummaryList(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.GetProjectSummaryForPageLoad(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, "GetUnfilteredProjectSummaryList", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } return(dt); }
/// <summary> /// Add Domain And SubDomain /// </summary> public void AddDomainAndSubDomain(Domain objDomain, SubDomain objSubDomain, ref int DomainId, ref int SubDomainId) { try { Rave.HR.DataAccessLayer.Projects.Projects objTechnologyCategoryDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); objTechnologyCategoryDAL.AddDomainAndSubDomain(objDomain, objSubDomain, ref DomainId, ref SubDomainId); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "TechnologyCategory", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
/// <summary> /// Add Category Technology /// </summary> public void AddCategoryTechnology(Category category, Technology technology, ref int CategoryId, ref int TechNologyId) { try { Rave.HR.DataAccessLayer.Projects.Projects objTechnologyCategoryDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); objTechnologyCategoryDAL.AddCategoryTechnology(category, technology, ref CategoryId, ref TechNologyId); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "TechnologyCategory", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
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); }
/// <summary> /// Added by Subhra : Issue Id 27631 Start /// To get Client name as per selected ProjectStatus /// </summary> /// <returns></returns> public List <BusinessEntities.Projects> GetClientNameAsPerStatus(BusinessEntities.ProjectCriteria objProjectCriteria) { try { Rave.HR.DataAccessLayer.Projects.Projects objClientNameDAL; List <BusinessEntities.Projects> ClientName; objClientNameDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); ClientName = new List <BusinessEntities.Projects>(); ClientName = objClientNameDAL.GetClientNameAsPerStatus(objProjectCriteria); return(ClientName); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "GetClientNameAsPerStatus", EventIDConstants.RAVE_HR_RECRUITMENT_BUSNIESS_LAYER); } }
/// <summary> /// Updates the existing project. /// </summary> /// <param name="objAddProject"></param> /// <returns></returns> public void UpdateProject(BusinessEntities.Projects objAddProject, string IsUpdated, string rmsURL, bool IsMailSentStatus) { try { Rave.HR.DataAccessLayer.Projects.Projects objUpdateProjectDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); //return objUpdateProjectDAL.UpdateProject(objAddProject); objUpdateProjectDAL.UpdateProject(objAddProject, IsUpdated); if (objAddProject.ProjectStatus == Convert.ToInt32(MasterEnum.ProjectStatus.Closed).ToString()) { SendEmailForProjectClosed(objAddProject); HttpContext.Current.Session["ConfirmationMessage"] = "Project " + objAddProject.ProjectName + " is closed, email notification is sent for the same."; } else { if (Convert.ToBoolean(IsUpdated) && Convert.ToBoolean(IsMailSentStatus) == true) { SendEmailForProjectEdited(objAddProject, rmsURL); HttpContext.Current.Session["ConfirmationMessage"] = "Project " + objAddProject.ProjectName + " is updated successfully, email notification is sent for the same."; } else { IsMailSentStatus = false; HttpContext.Current.Session["ConfirmationMessage"] = "Project " + objAddProject.ProjectName + " is updated successfully."; } } } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "UpdateProject", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
/// <summary> /// Gets the Project Search results based on search criteria /// </summary> /// <returns>List</returns> public List <BusinessEntities.Projects> GetProjectSearchResult(string strKeyword) { try { List <BusinessEntities.Projects> objListRetrieveProjectDetails = new List <BusinessEntities.Projects>(); Rave.HR.DataAccessLayer.Projects.Projects objRetrieveProjectDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); BusinessEntities.Projects objRaveHR = null; DataSet dsRetrieveProjectDetails = new DataSet(); dsRetrieveProjectDetails = objRetrieveProjectDAL.GetProjectSearchResult(strKeyword); foreach (DataRow drRetrieveProjectDetails in dsRetrieveProjectDetails.Tables[0].Rows) { objRaveHR = new BusinessEntities.Projects(); objRaveHR.ID = int.Parse(drRetrieveProjectDetails["ProjectID"].ToString()); objRaveHR.ClientName = drRetrieveProjectDetails["ClientName"].ToString(); objRaveHR.ProjectName = drRetrieveProjectDetails["ProjectName"].ToString(); objRaveHR.Location = drRetrieveProjectDetails["Location"].ToString(); objRaveHR.Category = drRetrieveProjectDetails["Category"].ToString(); objRaveHR.TechnologyName = drRetrieveProjectDetails["TechnologyName"].ToString(); objRaveHR.StartDate = DateTime.Parse(drRetrieveProjectDetails["StartDate"].ToString()); objRaveHR.EndDate = DateTime.Parse(drRetrieveProjectDetails["EndDate"].ToString()); objRaveHR.ProjectStartYear = int.Parse(drRetrieveProjectDetails["StartYear"].ToString()); objRaveHR.ProjectEndYear = int.Parse(drRetrieveProjectDetails["EndYear"].ToString()); objListRetrieveProjectDetails.Add(objRaveHR); } return(objListRetrieveProjectDetails); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRProjects.cs", "GetProjectSearchResult", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
/// <summary> /// This Function is used to retrieve Project Details after Project is added /// </summary> /// <param name="objViewProject"></param> /// <returns></returns> public BusinessEntities.Projects RetrieveProjectDetails(int ProjectID) { try { List <BusinessEntities.Projects> objListRetrieveProjectDetails = new List <BusinessEntities.Projects>(); Rave.HR.DataAccessLayer.Projects.Projects objRetrieveProjectDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); BusinessEntities.Projects objRaveHR = null; DataSet dsRetrieveProjectDetails = new DataSet(); dsRetrieveProjectDetails = objRetrieveProjectDAL.RetrieveProjectDetails(ProjectID); foreach (DataRow drRetrieveProjectDetails in dsRetrieveProjectDetails.Tables[0].Rows) { objRaveHR = new BusinessEntities.Projects(); objRaveHR.ClientName = drRetrieveProjectDetails["ClientName"].ToString(); objRaveHR.ProjectName = drRetrieveProjectDetails["ProjectName"].ToString(); objRaveHR.ProjectStatus = drRetrieveProjectDetails["CreatedBy"].ToString(); objRaveHR.CreatedBy = drRetrieveProjectDetails["MailId"].ToString(); objRaveHR.CreatedByFullName = drRetrieveProjectDetails["CreatedByFullName"].ToString(); objRaveHR.ProjectCode = drRetrieveProjectDetails["ProjectCode"].ToString(); objRaveHR.StartDate = Convert.ToDateTime(drRetrieveProjectDetails["StartDate"].ToString()); objRaveHR.EndDate = Convert.ToDateTime(drRetrieveProjectDetails["EndDate"].ToString()); } return(objRaveHR); //return dsRetrieveProjectDetails; } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, "RetrieveProjectDetails", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
/// <summary> /// Gets the Project Name. /// </summary> /// <returns>List</returns> //public List<BusinessEntities.Projects> getProjectName() public List <BusinessEntities.Projects> GetProjectNames() { try { Rave.HR.DataAccessLayer.Projects.Projects objProjectNameDAL; List <BusinessEntities.Projects> lstProjectName; BusinessEntities.Projects objProjectName; DataSet dsProjectName; objProjectNameDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); lstProjectName = new List <BusinessEntities.Projects>(); dsProjectName = new DataSet(); objProjectName = null; //dsProjectName = objProjectNameDAL.getProjectName(); dsProjectName = objProjectNameDAL.GetProjectNames(); foreach (DataRow drProjectName in dsProjectName.Tables[0].Rows) { objProjectName = new BusinessEntities.Projects(); objProjectName.ProjectName = drProjectName["ProjectName"].ToString(); objProjectName.ProjectId = int.Parse(drProjectName["ProjectID"].ToString()); lstProjectName.Add(objProjectName); } return(lstProjectName); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRProjects.cs", "getProjectName", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
/// <summary> /// Sends Email when project Status is closed /// </summary> /// <param name="objAddProject"></param> /// <returns></returns> public void SendEmailForProjectEdited(BusinessEntities.Projects objProjectDetails, string rmsURL) { try { BusinessEntities.RaveHRCollection raveHRCollection = new BusinessEntities.RaveHRCollection(); string strProjectStatus = string.Empty; string projectManagerEmail = string.Empty; string strProjectStatusFlag = objProjectDetails.ProjectStatus; string sComp = Utility.GetUrl(); string strProjectSummaryLink = sComp + CommonConstants.ADDPROJECT_PAGE + "?" + rmsURL; DataAccessLayer.Projects.Projects objProjectsDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); BusinessEntities.Projects objProjectDetailsUpdated = new BusinessEntities.Projects(); objProjectDetailsUpdated = objProjectsDAL.GetEditedProjectDetails(objProjectDetails); IRMSEmail obj = new RMSEmail(Convert.ToInt16(EnumsConstants.RMSModule.Projects), Convert.ToInt16(EnumsConstants.EmailFunctionality.EditedProject)); //Get ProjectManager Name raveHRCollection = DataAccessLayer.Projects.Projects.GetProjectManagerByProjectId(objProjectDetails); if (raveHRCollection.Count > 0) { 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); } } obj.To.Add(objProjectDetails.EmailIdOfPM); } string tableData = GetHTMLForProjectEdited(objProjectDetailsUpdated); obj.Subject = string.Format(obj.Subject, objProjectDetails.ProjectCode, objProjectDetails.ClientName, objProjectDetails.ProjectName); obj.Body = string.Format(obj.Body, objProjectDetails.ProjectName, objProjectDetails.ClientName, tableData, strProjectSummaryLink); obj.SendEmail(obj); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, PROJECTS, SEND_MAIL_EDIT_PROJECT, EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }
/// <summary> /// This Function is used to View Project Details. /// </summary> /// <param name="objViewProject"></param> /// <returns></returns> public List <BusinessEntities.Projects> GetProjectDetails(BusinessEntities.Projects objViewProject, string SortDir, string SortExpression, string UserMailID, string PreSaleRole, string PMRole, string COORole, string RPMRole, string Action, string clientName, int projectStatusId, string projectsummaryprojectname) { try { List <BusinessEntities.Projects> objListViewProjectDetails = new List <BusinessEntities.Projects>(); Rave.HR.DataAccessLayer.Projects.Projects objViewProjectDAL = new Rave.HR.DataAccessLayer.Projects.Projects(); BusinessEntities.Projects objRaveHR = null; DataSet dsViewProjectDetails = new DataSet(); dsViewProjectDetails = objViewProjectDAL.ViewProjectDetails(objViewProject, SortDir, SortExpression, UserMailID, PreSaleRole, PMRole, COORole, RPMRole, Action, clientName, projectStatusId, projectsummaryprojectname); foreach (DataRow drViewProjectDetails in dsViewProjectDetails.Tables[0].Rows) { objRaveHR = new BusinessEntities.Projects(); objRaveHR.ProjectId = int.Parse(drViewProjectDetails["ProjectID"].ToString()); objRaveHR.ProjectCode = drViewProjectDetails["ProjectCode"].ToString(); objRaveHR.ClientName = drViewProjectDetails["ClientName"].ToString(); objRaveHR.ProjectName = drViewProjectDetails["ProjectName"].ToString(); objRaveHR.ProjectStatus = drViewProjectDetails["StatusID"].ToString(); objRaveHR.Location = drViewProjectDetails["Location"].ToString(); objRaveHR.Domain = drViewProjectDetails["Domain"].ToString(); objRaveHR.ProjectCategoryID = drViewProjectDetails["ProjectCategoryID"].ToString(); objRaveHR.StandardHours = drViewProjectDetails["StandardHours"].ToString(); objRaveHR.ProjectGroup = drViewProjectDetails["ProjectGroup"].ToString(); // Mohamed : Issue : 26/09/2014 : Starts // Desc : Add Division, Business Area, Business Segment, Project Alias in Contract page -- NIS-RMS objRaveHR.ProjectDivision = String.IsNullOrEmpty(drViewProjectDetails["Division"].ToString()) ? 0 : Convert.ToInt32(drViewProjectDetails["Division"].ToString()); objRaveHR.ProjectBussinessArea = String.IsNullOrEmpty(drViewProjectDetails["BusinessArea"].ToString()) ? 0 : Convert.ToInt32(drViewProjectDetails["BusinessArea"].ToString()); objRaveHR.ProjectBussinessSegment = String.IsNullOrEmpty(drViewProjectDetails["BusinessSegment"].ToString()) ? 0 : Convert.ToInt32(drViewProjectDetails["BusinessSegment"].ToString()); //objRaveHR.ProjectAlias = drViewProjectDetails["ProjectAlias"].ToString(); // Mohamed : Issue : 23/09/2014 : Ends //Siddharth 13 March 2015 Start objRaveHR.ProjectModel = drViewProjectDetails["ProjectModel"].ToString(); //Siddharth 13 March 2015 End //Siddharth 3 August 2015 Start objRaveHR.BusinessVertical = drViewProjectDetails["BusinessVertical"].ToString(); //Siddharth 3 August 2015 End //Rakesh : HOD for Employees 12/July/2016 Begin objRaveHR.ProjectHeadId = drViewProjectDetails["ProjectHeadId"].CastToInt32(); //Rakesh : HOD for Employees 12/July/2016 End objRaveHR.Description = drViewProjectDetails["Description"].ToString(); if (!String.IsNullOrEmpty(drViewProjectDetails["StartDate"].ToString())) { objRaveHR.StartDate = DateTime.Parse(drViewProjectDetails["StartDate"].ToString()); } if (!String.IsNullOrEmpty(drViewProjectDetails["EndDate"].ToString())) { objRaveHR.EndDate = DateTime.Parse(drViewProjectDetails["EndDate"].ToString()); } objRaveHR.Reject = drViewProjectDetails["ReasonForRejection"].ToString(); objRaveHR.Delete = drViewProjectDetails["ReasonForDeletion"].ToString(); objRaveHR.OnGoingProjectStatusID = drViewProjectDetails["OnGoingProjectStatusID"].ToString(); foreach (DataRow drViewProjectDetails1 in dsViewProjectDetails.Tables[1].Rows) { objRaveHR.FirstName = drViewProjectDetails1["FullName"].ToString(); objRaveHR.EmailIdOfPM = drViewProjectDetails1["EmailId"].ToString(); } DataRelation drelCategoryTechnology = new DataRelation("Category_Technology", dsViewProjectDetails.Tables[2].Columns["ID"], dsViewProjectDetails.Tables[3].Columns["CategoryID"]); dsViewProjectDetails.Relations.Add(drelCategoryTechnology); foreach (DataRow drCategory in dsViewProjectDetails.Tables[2].Rows) { Category category = new Category(); category.CategoryId = int.Parse(drCategory["ID"].ToString()); category.CategoryName = drCategory["Category"].ToString(); objRaveHR.Categories.Add(category); foreach (DataRow drTechnology in drCategory.GetChildRows(drelCategoryTechnology)) { category.Technologies.Add(new Technology(int.Parse(drTechnology["ID"].ToString()), drTechnology["TechnologyName"].ToString(), int.Parse(drTechnology["ID"].ToString()))); } } DataRelation drelDomainSubDomain = new DataRelation("Domain_SubDomain", dsViewProjectDetails.Tables[4].Columns["ID"], dsViewProjectDetails.Tables[5].Columns["DomainID"]); dsViewProjectDetails.Relations.Add(drelDomainSubDomain); foreach (DataRow drDomain in dsViewProjectDetails.Tables[4].Rows) { Domain domain = new Domain(); domain.DomainId = int.Parse(drDomain["ID"].ToString()); domain.DomainName = drDomain["Domain"].ToString(); objRaveHR.LstDomain.Add(domain); foreach (DataRow drSubDomain in drDomain.GetChildRows(drelDomainSubDomain)) { domain.lstSubDomain.Add(new SubDomain(int.Parse(drSubDomain["ID"].ToString()), int.Parse(drSubDomain["DomainID"].ToString()), drSubDomain["SubDomainName"].ToString())); } } foreach (DataRow drWorkFlowStatus in dsViewProjectDetails.Tables[6].Rows) { objRaveHR.WorkFlowStatus = drWorkFlowStatus["Code"].ToString(); } objListViewProjectDetails.Add(objRaveHR); } return(objListViewProjectDetails); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, "RaveHRProjects.cs", "GetProjectDetails", EventIDConstants.RAVE_HR_PROJECTS_BUSNIESS_LAYER); } }