/// <summary>
        /// Shift the seat from one location to another.
        /// </summary>
        /// <param name="Source"></param>
        /// <param name="Destination"></param>
        /// <returns></returns>
        public bool ShiftLocation(BusinessEntities.SeatAllocation Source, BusinessEntities.SeatAllocation Destination)
        {
            try
            {
                //instantiate SeatAllocation object of data layer.
                objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();

                result = objSeatAllocation.ShiftLocation(Source, Destination);

                if (result)
                {
                    SendSeatShiftingEmail(Source, Destination);
                }

                return(result);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASSNAME, GETSEATDETAILS, EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
            }
        }
        /// <summary>
        /// Swaping seat location.
        /// </summary>
        /// <param name="sourceSeatId"> first seat location</param>
        /// <param name="destinationSeatId"> 2nd seat location</param>
        /// <returns></returns>
        public bool SwapLocation(BusinessEntities.SeatAllocation source,
                                 BusinessEntities.SeatAllocation destination)
        {
            try
            {
                //instantiate SeatAllocation object of data layer
                objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();

                result = objSeatAllocation.SwapLocation(source, destination);

                if (result)
                {
                    //Shifting mail for first shifted employee.
                    SendSeatShiftingEmail(source, destination);

                    //Shifting mail for second shifted employee.
                    SendSeatShiftingEmail(destination, source);
                }

                return(result);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASSNAME, GETSEATDETAILS, EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
            }
        }
        public bool Allocate(BusinessEntities.SeatAllocation SeatDetails)
        {
            try
            {
                //instantiate SeatAllocation object of data layer
                objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();

                result = objSeatAllocation.Allocate(SeatDetails);

                if (result)
                {
                    SendAllocatationEMail(SeatDetails);
                }

                return(result);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASSNAME, "Allocate", EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
            }
        }
        /// <summary>
        /// This function returns all employee details which are not allocated to seat.
        /// </summary>
        /// <returns></returns>
        public List <BusinessEntities.SeatAllocation> GetUnAllocatedEmployee()
        {
            objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();
            List <BusinessEntities.SeatAllocation> EmployeeDetail = new List <BusinessEntities.SeatAllocation>();

            EmployeeDetail = objSeatAllocation.UnallocatedEmployee();
            return(EmployeeDetail);
        }
        /// <summary>
        ///  This method will fetch records of seats from  Data acess layer and return to UI layer.
        /// </summary>
        /// <returns>list</returns>
        public BusinessEntities.RaveHRCollection GetSeatDetails(BusinessEntities.SeatAllocation Section)
        {
            try
            {
                //instantiate SeatAllocation object of data layer
                objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();

                raveHRCollection = objSeatAllocation.GetSeatDetails(Section);

                return(raveHRCollection);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASSNAME, GETSEATDETAILS, EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
            }
        }
        /// <summary>
        ///  This method will fetch records of seats from  Data acess layer and return to UI layer.
        /// </summary>
        /// <returns>list</returns>
        public BusinessEntities.SeatAllocation GetSeatDetailsByID(BusinessEntities.SeatAllocation Seat)
        {
            try
            {
                //instantiate SeatAllocation object of data layer
                objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();
                BusinessEntities.SeatAllocation SeatData = new BusinessEntities.SeatAllocation();

                SeatData = objSeatAllocation.GetSeatDeatilsByID(Seat);

                return(SeatData);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASSNAME, GETEMPLOYEEDETAILSBYID, EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
            }
        }
        /// <summary>
        /// To check Employee Location.
        /// </summary>
        /// <param name="employeeId"></param>
        /// <returns></returns>
        public BusinessEntities.SeatAllocation CheckEmployeeLocation(int employeeId)
        {
            try
            {
                //instantiate SeatAllocation object of data layer
                objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();
                BusinessEntities.SeatAllocation SeatData = new BusinessEntities.SeatAllocation();

                SeatData = objSeatAllocation.CheckEmployeeLocation(employeeId);

                return(SeatData);
            }
            catch (RaveHRException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new RaveHRException(ex.Message, ex, Sources.BusinessLayer, CLASSNAME, "CheckEmployeeLocation", EventIDConstants.RAVE_HR_SEATALLOCATION_PRESENTATION_LAYER);
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="branchId"></param>
        /// <returns></returns>
        public RaveHRCollection GetSectionByBranch(int branchId)
        {
            objSeatAllocation = new Rave.HR.DataAccessLayer.SeatAllocation.SeatAllocation();

            return(objSeatAllocation.GetSectionByBranch(branchId));
        }