Beispiel #1
0
        /// <summary>
        /// Creates the exit management view.
        /// </summary>
        /// <param name="employeeId">The employee identifier.</param>
        /// <param name="companyId">The company identifier.</param>
        /// <param name="typeOfExitCollection">The type of exit collection.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">
        /// employeeId
        /// or
        /// companyId
        /// or
        /// typeOfExitCollection
        /// </exception>
        public IEmployeeExitView CreateExitManagementView(IEmployee employee, ICompanyDetail company, IList <ITypeOfExit> typeOfExitCollection)
        {
            if (employee == null)
            {
                throw new ArgumentNullException(nameof(employee));
            }

            if (company == null)
            {
                throw new ArgumentNullException(nameof(company));
            }

            if (typeOfExitCollection == null)
            {
                throw new ArgumentNullException(nameof(typeOfExitCollection));
            }

            var typeOfExitDDL = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, -1);

            var result = new EmployeeExitView
            {
                TypeOfExitDropDown = typeOfExitDDL,
                ProcessingMessage  = string.Empty,
                Employee           = employee,
                Company            = company,
            };

            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// Creates the type of exit view.
        /// </summary>
        /// <param name="typeOfExitView">The type of exit view.</param>
        /// <param name="employeeCollection">The employee collection.</param>
        /// <param name="typeOfExitCollection">The type of exit collection.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">
        /// typeOfExitView
        /// or
        /// employeeCollection
        /// or
        /// typeOfExitCollection
        /// </exception>
        public ITypeOfExitView CreateTypeOfExitView(ITypeOfExitView typeOfExitView, IList <IEmployee> employeeCollection, IList <ITypeOfExit> typeOfExitCollection)
        {
            if (typeOfExitView == null)
            {
                throw new ArgumentNullException(nameof(typeOfExitView));
            }

            if (employeeCollection == null)
            {
                throw new ArgumentNullException(nameof(employeeCollection));
            }

            if (typeOfExitCollection == null)
            {
                throw new ArgumentNullException(nameof(typeOfExitCollection));
            }
            var employeeDDL    = GetDropDownList.EmployeeListitems(employeeCollection, typeOfExitView.EmployeeId);
            var typeOfExitDDL  = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, typeOfExitView.TypeOfExitId);
            var interViewerDDL = GetDropDownList.EmployeeListitems(employeeCollection, typeOfExitView.EmployeeId);

            typeOfExitView.EmployeeDropDown    = employeeDDL;
            typeOfExitView.TypeOfExitDropDown  = typeOfExitDDL;
            typeOfExitView.InterViewerDropDown = interViewerDDL;

            return(typeOfExitView);
        }
Beispiel #3
0
        /// <summary>
        /// Creates the exit management view.
        /// </summary>
        /// <param name="employeeExitView">The employee exit view.</param>
        /// <param name="processingMessage">The processing message.</param>
        /// <returns></returns>
        public IEmployeeExitView CreateExitManagementView(IEmployeeExitView employeeExitView, IList <ICompanyDetail> companyCollection, IList <IEmployee> employeeCollection, IList <ITypeOfExit> typeOfExitCollection, string processingMessage)
        {
            if (employeeExitView == null)
            {
                throw new ArgumentNullException(nameof(employeeExitView));
            }

            if (companyCollection == null)
            {
                throw new ArgumentNullException(nameof(companyCollection));
            }

            if (employeeCollection == null)
            {
                throw new ArgumentNullException(nameof(employeeCollection));
            }

            if (typeOfExitCollection == null)
            {
                throw new ArgumentNullException(nameof(typeOfExitCollection));
            }

            var companyDDL    = GetDropDownList.CompanyListItems(companyCollection, employeeExitView.CompanyId);
            var employeeDDL   = GetDropDownList.EmployeeListitems(employeeCollection, employeeExitView.EmployeeId);
            var typeOfExitDDL = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, employeeExitView.TypeOfExitId);

            employeeExitView.CompanyDropDown    = companyDDL;
            employeeExitView.EmployeeDropDown   = employeeDDL;
            employeeExitView.TypeOfExitDropDown = typeOfExitDDL;
            employeeExitView.ProcessingMessage  = processingMessage;

            return(employeeExitView);
        }
Beispiel #4
0
        /// <summary>
        /// </summary>
        /// <param name="companyCollection"></param>
        /// <param name="typeOfExitCollection"></param>
        /// <param name="employeeCollection"></param>
        /// <param name="typeOfExitInfo"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public ITypeOfExitView CreateTypeOfExitView(int companyId, IList <ITypeOfExit> typeOfExitCollection, IList <IEmployee> employeeCollection, ITypeOfExit typeOfExitInfo, string message)
        {
            //if (typeOfExitId == null) throw new ArgumentNullException(nameof(typeOfExitId));

            var employeeDDL   = GetDropDownList.EmployeeListitems(employeeCollection, -1);
            var typeOfExitDDL = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, -1);

            var viewModel = new TypeOfExitView
            {
                EmployeeDropDown    = employeeDDL,
                InterViewerDropDown = employeeDDL,
                ProcessingMessage   = string.Empty,
                CompanyId           = companyId
            };

            return(viewModel);
        }
Beispiel #5
0
        /// <summary>
        /// Creates the exit management update view.
        /// </summary>
        /// <param name="employeeExitView">The employee exit view.</param>
        /// <param name="typeOfExitCollection">The type of exit collection.</param>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">
        /// employeeExitView
        /// or
        /// typeOfExitCollection
        /// </exception>
        public IEmployeeExitView CreateExitManagementUpdateView(IEmployeeExitView employeeExitView, IList <ITypeOfExit> typeOfExitCollection, string message)
        {
            if (employeeExitView == null)
            {
                throw new ArgumentNullException(nameof(employeeExitView));
            }

            if (typeOfExitCollection == null)
            {
                throw new ArgumentNullException(nameof(typeOfExitCollection));
            }

            var typeOfExitDDL = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, employeeExitView.TypeOfExitId);

            employeeExitView.TypeOfExitDropDown = typeOfExitDDL;
            employeeExitView.ProcessingMessage  = message;


            return(employeeExitView);
        }