示例#1
0
        public EmployeeLeaveInformationController()
        {
            var kernel = GlobalConfiguration.Configuration.DependencyResolver as NinjectResolver;

            if (kernel != null)
            {
                _employeeLeaveInformationService = kernel.GetService(typeof(EmployeeLeaveInformationService)) as EmployeeLeaveInformationService;
                _annualHolidayCategoryService    = kernel.GetService(typeof(IAnnualHolidayCategoryService)) as AnnualHolidayCategoryService;
                _weekendCategoryService          = kernel.GetService(typeof(IWeekendCategoryService)) as WeekendCategoryService;
                _leavePolicyService = kernel.GetService(typeof(ILeavePolicyService)) as LeavePolicyService;
                _employeeService    = kernel.GetService(typeof(IEmployeeService)) as EmployeeService;
            }
        }
示例#2
0
        public EmployeeLeaveRequestController()
        {
            var kernel = GlobalConfiguration.Configuration.DependencyResolver as NinjectResolver;

            if (kernel != null)
            {
                _employeeLeaveRequestService     = kernel.GetService(typeof(EmployeeLeaveRequestService)) as EmployeeLeaveRequestService;
                _leaveTypeService                = kernel.GetService(typeof(ILeaveTypeService)) as LeaveTypeService;
                _leaveApprovalStatusService      = kernel.GetService(typeof(ILeaveApprovalStatusService)) as LeaveApprovalStatusService;
                _employeeService                 = kernel.GetService(typeof(IEmployeeService)) as EmployeeService;
                _employeeLeaveInformationService = kernel.GetService(typeof(IEmployeeLeaveInformationService)) as IEmployeeLeaveInformationService;
            }
        }