Exemplo n.º 1
0
        /// <summary>
        /// this is data transfer object for Department.
        /// Converting from presentation layer Department object to business layer Department object
        /// </summary>
        /// <param name="staffMember"></param>
        /// <returns>instance of SLDepartment</returns>
        private static SLStaff.Department DTO_to_SL(PLDepartment dept)
        {
            SLStaff.Department slDept = new SLStaff.Department();
            slDept.id       = dept.ID;
            slDept.deptName = dept.deptName;
            slDept.chairID  = dept.chair_id;

            return(slDept);
        }
Exemplo n.º 2
0
        /// <summary>
        /// This is the data transfer object for Department.
        /// Converting business layer Department object to presentation layer Department object
        /// </summary>
        /// <param name="Staff"></param>
        /// <returns> a presentation layer Department object</returns>
        private static PLDepartment DTO_to_PL(SLStaff.Department dept)
        {
            PLDepartment plDept = new PLDepartment();

            plDept.ID       = dept.id;
            plDept.deptName = dept.deptName;
            plDept.chair_id = dept.chairID;

            return(plDept);
        }