/// <summary> /// To Get the Employee Resume Count /// </summary> /// <param name="objAddProjectDetails">The obj add project details.</param> public BusinessEntities.RaveHRCollection GetEmployeeResumeCountDetails(BusinessEntities.EmployeeResume objGetEmployeeResumeCount) { Rave.HR.DataAccessLayer.Employees.EmployeeResume objEmployeeResumeCountDAL; try { //Created new instance of CertificationDetails class to call AddCertificationDetails() of Data access layer objEmployeeResumeCountDAL = new Rave.HR.DataAccessLayer.Employees.EmployeeResume(); //Call to AddCertificationDetails() of Data access layer return(objEmployeeResumeCountDAL.GetEmpResumeCountDetails(objGetEmployeeResumeCount)); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASS_NAME, EMPLOYEERESUME, EventIDConstants.RAVE_HR_EMPLOYEE_BUSNIESS_LAYER); } }
/// <summary> /// Adds the project details. /// </summary> /// <param name="objAddProjectDetails">The obj add project details.</param> public BusinessEntities.RaveHRCollection GetEmpResumeCountDetails(BusinessEntities.EmployeeResume objEmployeeResumeCount) { //Initialise Collection class object raveHRCollection = new BusinessEntities.RaveHRCollection(); try { objDA = new DataAccessClass(); objDA.OpenConnection(DBConstants.GetDBConnectionString()); SqlParameter[] sqlParam = new SqlParameter[1]; sqlParam[0] = new SqlParameter(SPParameter.EmpId, SqlDbType.Int); sqlParam[0].Value = objEmployeeResumeCount.EMPId; objDataReader = objDA.ExecuteReaderSP(SPNames.USP_Employee_GetEmployeeResumeCountDetails, sqlParam); while (objDataReader.Read()) { //Initialise the Business Entity object objEmployeeResumeCount = new BusinessEntities.EmployeeResume(); objEmployeeResumeCount.ResumeCount = objDataReader[DbTableColumn.ResumeCount].ToString(); // Add the object to Collection raveHRCollection.Add(objEmployeeResumeCount); } } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.DataAccessLayer, CLASS_NAME, "GetResumeDetailsCount", EventIDConstants.RAVE_HR_EMPLOYEE_DATA_ACCESS_LAYER); } finally { objDA.CloseConncetion(); } return(raveHRCollection); }
/// <summary> /// Gets the Employee Resume details. /// </summary> /// <param name="objGetCertificationDetails">The obj get certification details.</param> /// <returns></returns> public BusinessEntities.RaveHRCollection GetEmployeeResumeDetails(BusinessEntities.EmployeeResume objGetEmployeeResumeDetails) { //Object declaration of QualificationDetails class Rave.HR.DataAccessLayer.Employees.EmployeeResume objGetEmployeeResumeDetailsDAL; try { //Created new instance of QualificationDetails class to call objGetQualificationDetailsDAL() of Data access layer objGetEmployeeResumeDetailsDAL = new Rave.HR.DataAccessLayer.Employees.EmployeeResume(); //Call to GetQualificationDetails() of Data access layer and return the Qualifications return(objGetEmployeeResumeDetailsDAL.GetEmployeeResumeDetails(objGetEmployeeResumeDetails)); } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASS_NAME, EMPLOYEERESUME, EventIDConstants.RAVE_HR_EMPLOYEE_BUSNIESS_LAYER); } }
/// <summary> /// Adds the project details. /// </summary> /// <param name="objAddProjectDetails">The obj add project details.</param> public BusinessEntities.RaveHRCollection AddEmpResumeDetails(BusinessEntities.EmployeeResume objEmployeeResume) { //Initialise Collection class object raveHRCollection = new BusinessEntities.RaveHRCollection(); try { objDA = new DataAccessClass(); objDA.OpenConnection(DBConstants.GetDBConnectionString()); SqlParameter[] sqlParam = new SqlParameter[5]; sqlParam[0] = new SqlParameter(SPParameter.EmpId, SqlDbType.Int); sqlParam[0].Value = objEmployeeResume.EMPId; sqlParam[1] = new SqlParameter(SPParameter.DocumentName, SqlDbType.NVarChar, 50); if (objEmployeeResume.DocumentName == "" || objEmployeeResume.DocumentName == null) { sqlParam[1].Value = DBNull.Value; } else { sqlParam[1].Value = objEmployeeResume.DocumentName; } sqlParam[2] = new SqlParameter(SPParameter.ModifyDate, SqlDbType.SmallDateTime); if (objEmployeeResume.ModifyDate == DateTime.MinValue || objEmployeeResume.ModifyDate == null) { sqlParam[2].Value = DBNull.Value; } else { sqlParam[2].Value = objEmployeeResume.ModifyDate; } sqlParam[3] = new SqlParameter(SPParameter.ModifyBy, SqlDbType.NVarChar, 50); if (objEmployeeResume.ModifyBy == "" || objEmployeeResume.ModifyBy == null) { sqlParam[3].Value = DBNull.Value; } else { sqlParam[3].Value = objEmployeeResume.ModifyBy; } sqlParam[4] = new SqlParameter(SPParameter.FileExtension, SqlDbType.NVarChar, 50); if (objEmployeeResume.FileExtension == string.Empty || objEmployeeResume.FileExtension == null) { sqlParam[4].Value = DBNull.Value; } else { sqlParam[4].Value = objEmployeeResume.FileExtension; } objDataReader = objDA.ExecuteReaderSP(SPNames.USP_Employee_AddEmployeeResumeDetails, sqlParam); while (objDataReader.Read()) { //Initialise the Business Entity object objEmployeeResume = new BusinessEntities.EmployeeResume(); objEmployeeResume.ResumeCount = objDataReader[DbTableColumn.ResumeCount].ToString(); // Add the object to Collection raveHRCollection.Add(objEmployeeResume); } } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.DataAccessLayer, CLASS_NAME, "AddResumeDetails", EventIDConstants.RAVE_HR_EMPLOYEE_DATA_ACCESS_LAYER); } finally { objDA.CloseConncetion(); } return(raveHRCollection); }
/// <summary> /// Gets the Employee Resume details. /// </summary> /// <param name="objGetCertificationDetails">The object get Employee Resume details.</param> /// <returns></returns> public BusinessEntities.RaveHRCollection GetEmployeeResumeDetails(BusinessEntities.EmployeeResume objGetEmployeeResumeDetails) { //Initialise Data Access Class object objDA = new DataAccessClass(); //Initialise SqlParameter Class object sqlParam = new SqlParameter[1]; //Initialise Collection class object raveHRCollection = new BusinessEntities.RaveHRCollection(); try { //Open the connection to DB objDA.OpenConnection(DBConstants.GetDBConnectionString()); //Check each parameters nullibality and add values to sqlParam object accordingly sqlParam[0] = new SqlParameter(SPParameter.EmpId, SqlDbType.Int); if (objGetEmployeeResumeDetails.EMPId == 0) { sqlParam[0].Value = DBNull.Value; } else { sqlParam[0].Value = objGetEmployeeResumeDetails.EMPId; } objDataReader = objDA.ExecuteReaderSP(SPNames.USP_Employee_GetEmployeeResumeDetails, sqlParam); while (objDataReader.Read()) { //Initialise the Business Entity object objGetEmployeeResumeDetails = new BusinessEntities.EmployeeResume(); objGetEmployeeResumeDetails.ResumeId = Convert.ToInt32(objDataReader[DbTableColumn.ResumeId].ToString()); objGetEmployeeResumeDetails.EMPId = Convert.ToInt32(objDataReader[DbTableColumn.EMPId].ToString()); objGetEmployeeResumeDetails.DocumentName = objDataReader[DbTableColumn.DocumentName].ToString(); objGetEmployeeResumeDetails.ModifyDate = Convert.ToDateTime(objDataReader[DbTableColumn.ModifyDate].ToString()); objGetEmployeeResumeDetails.ModifyBy = objDataReader[DbTableColumn.ModifyBy].ToString(); objGetEmployeeResumeDetails.FileExtension = objDataReader[DbTableColumn.FileExtension].ToString(); // Add the object to Collection raveHRCollection.Add(objGetEmployeeResumeDetails); } } catch (RaveHRException ex) { throw ex; } catch (Exception ex) { throw new RaveHRException(ex.Message, ex, Sources.DataAccessLayer, CLASS_NAME, GETEMPLOYEERESUMEETAILS, EventIDConstants.RAVE_HR_PROJECTS_DATA_ACCESS_LAYER); } finally { if (objDataReader != null) { objDataReader.Close(); } objDA.CloseConncetion(); } // Return the Collection return(raveHRCollection); }