/// <summary>
        /// this is data transfer object for department.
        /// Converting from presentation layer department object to business layer department object
        /// </summary>
        /// <param name="department"></param>
        /// <returns></returns>
        private static SLDepartment.Department DTO_to_SL(PLDepartment department)
        {
            SLDepartment.Department SLDepartment = new SLDepartment.Department();
            SLDepartment.id       = department.ID;
            SLDepartment.deptName = department.deptName;
            SLDepartment.chairID  = department.chair_id;

            return(SLDepartment);
        }
        /// <summary>
        /// update existing department info
        /// </summary>
        /// <param name="s"></param>
        public static void UpdateDepartment(PLDepartment s)
        {
            SLDepartment.Department newDepartment = DTO_to_SL(s);

            SLDepartment.ISLDepartment SLDepartment = new SLDepartment.SLDepartmentClient();
            string[] errors = new string[0];
            SLDepartment.UpdateDepartmentRequest request = new SLDepartment.UpdateDepartmentRequest(newDepartment, errors);
            SLDepartment.UpdateDepartment(request);
        }
        /// <summary>
        /// This is the data transfer object for department.
        /// Converting business layer department object to presentation layer department object
        /// </summary>
        /// <param name="department"></param>
        /// <returns></returns>
        private static PLDepartment DTO_to_PL(SLDepartment.Department department)
        {
            PLDepartment PLDepartment = new PLDepartment();

            PLDepartment.ID       = department.id;
            PLDepartment.deptName = department.deptName;
            PLDepartment.chair_id = department.chairID;
            return(PLDepartment);
        }
        public static List <PLDepartment> GetDepartmentList()
        {
            List <PLDepartment> departmentList = new List <PLDepartment>();

            SLDepartment.ISLDepartment client = new SLDepartment.SLDepartmentClient();

            string[] errors = new string[0];
            SLDepartment.GetDepartmentListRequest  request  = new SLDepartment.GetDepartmentListRequest(errors);
            SLDepartment.GetDepartmentListResponse response = client.GetDepartmentList(request);
            SLDepartment.Department[] departmentsLoaded     = response.GetDepartmentListResult;

            foreach (SLDepartment.Department s in departmentsLoaded)
            {
                PLDepartment department = DTO_to_PL(s);
                departmentList.Add(department);
            }

            return(departmentList);
        }