示例#1
0
        /// <summary>
        /// This method is used for editing the contract details
        /// </summary>
        /// <param name="contractAdd"></param>
        /// <returns></returns>
        public bool Edit(BusinessEntities.Contract contractAdd, DataTable contractProject, RaveHRCollection CRDetailsCollection)
        {
            bool result = false;

            try
            {
                //Defines a bl layer object.
                Rave.HR.DataAccessLayer.Contracts.Contract EditContractDL = new Rave.HR.DataAccessLayer.Contracts.Contract();

                // Calls the data layer function for editing the contract details.
                result = EditContractDL.edit(contractAdd);

                if (result)
                {
                    result = EditProjects(contractAdd, contractProject, CRDetailsCollection);
                }
                return(result);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, EDIT, EventIDConstants.RAVE_HR_CONTRACT_BUSNIESS_LAYER);
            }
        }
示例#2
0
        /// <summary>
        /// This method is used for saving the contract details
        /// </summary>
        /// <param name="contractAdd"></param>
        /// <returns></returns>
        public int Save(BusinessEntities.Contract contractAdd, DataTable projectDetails)
        {
            int contractId = 0;

            try
            {
                Rave.HR.DataAccessLayer.Contracts.Contract saveContractBL = new Rave.HR.DataAccessLayer.Contracts.Contract();

                contractId             = saveContractBL.Save(contractAdd);
                contractAdd.ContractID = contractId;

                if (contractId != 0)
                {
                    SaveProjects(contractAdd, projectDetails);
                }
                return(contractId);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, SAVE, EventIDConstants.RAVE_HR_CONTRACT_BUSNIESS_LAYER);
            }
        }
示例#3
0
        /// <summary>
        /// This Function is used to View Contract Details.
        /// </summary>
        /// <param name="objViewProject"></param>
        /// <returns></returns>
        public List <BusinessEntities.ContractProject> GetContractProjectDetails(int ContractID, string SortDir, string SortExpression)
        {
            try
            {
                Rave.HR.DataAccessLayer.Contracts.Contract objViewContracDAL = new Rave.HR.DataAccessLayer.Contracts.Contract();

                List <BusinessEntities.ContractProject> objContractProject = null;

                objContractProject = objViewContracDAL.ViewContractProjectDetails(ContractID);

                return(objContractProject);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, GETCONTRACTPROJECTDETAILS, EventIDConstants.RAVE_HR_CONTRACT_BUSNIESS_LAYER);
            }
        }
示例#4
0
        /// <summary>
        /// Deletes the CR details.
        /// </summary>
        /// <param name="objDeleteQualificationDetails">The obj delete qualification details.</param>
        public void DeleteCRDetails(BusinessEntities.Contract objDeleteCRDetails)
        {
            //Object declaration of QualificationDetails class
            Rave.HR.DataAccessLayer.Contracts.Contract objDeleteCRDetailsDAL;

            try
            {
                //Created new instance of CRDetails class to call DeleteCRDetails() of Data access layer
                objDeleteCRDetailsDAL = new Rave.HR.DataAccessLayer.Contracts.Contract();

                //Call to DeleteQualificationDetails() of Data access layer
                objDeleteCRDetailsDAL.DeleteCRDetails(objDeleteCRDetails);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, "DeleteCRDetails", EventIDConstants.RAVE_HR_EMPLOYEE_BUSNIESS_LAYER);
            }
        }
示例#5
0
        /// <summary>
        /// Gets the CR details.
        /// </summary>
        /// <param name="objGetQualificationDetails">The obj get qualification details.</param>
        /// <returns></returns>
        public BusinessEntities.RaveHRCollection GetCRDetails(BusinessEntities.Contract objGetCRDetails)
        {
            //Object declaration of CRDetails class
            Rave.HR.DataAccessLayer.Contracts.Contract objGetCRDetailsDAL;

            try
            {
                //Created new instance of CRDetails class to call objGetQualificationDetailsDAL() of Data access layer
                objGetCRDetailsDAL = new Rave.HR.DataAccessLayer.Contracts.Contract();

                //Call to GetCRDetails() of Data access layer and return the CRdetails
                return(objGetCRDetailsDAL.GetCRDetails(objGetCRDetails));
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, "GetCRDetails", EventIDConstants.RAVE_HR_EMPLOYEE_BUSNIESS_LAYER);
            }
        }
示例#6
0
        public bool checkCRReferenceNo(BusinessEntities.Contract objCRDetails)
        {
            try
            {
                //Object declaration of QualificationDetails class
                Rave.HR.DataAccessLayer.Contracts.Contract objCRDetailsDAL;

                bool Check = false;

                objCRDetailsDAL = new Rave.HR.DataAccessLayer.Contracts.Contract();

                Check = objCRDetailsDAL.checkCRReferenceNo(objCRDetails);

                return(Check);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CONTRACT, "checkCRReferenceNo", EventIDConstants.RAVE_HR_CONTRACT_BUSNIESS_LAYER);
            }
        }