Esempio n. 1
0
 public PayslipController(UnisolAPIdbContext context, IConfiguration configuration, IStaffServices staffServices)
 {
     _context       = context;
     _configuration = configuration;
     _staffServices = staffServices;
     staffUtilities = new StaffUtilities();
 }
        public AdminController(IStaffServices iStaffServices,
                               IContactInformationServices iContactInformationServices,
                               IServiceServices iServiceServices,
                               ISalaryServices iSalaryServices,
                               IReferenceServices iReferenceServices,
                               INotificationServices iNotificationServices,
                               IBookingServices iBookingServices,
                               IBedServices iBedServices,
                               IStockServices iStockServices,
                               ICustomerServices iCustomerServices)
        {
            logger.EnterMethod();
            this._iStaffServices = iStaffServices;
            this._iContactInformationServices = iContactInformationServices;
            this._iServiceServices            = iServiceServices;
            this._iSalaryServices             = iSalaryServices;
            this._iReferenceServices          = iReferenceServices;
            this._iNotificationServices       = iNotificationServices;
            this._iBookingServices            = iBookingServices;
            this._iBedServices      = iBedServices;
            this._iStockServices    = iStockServices;
            this._iCustomerServices = iCustomerServices;
            logger.Info("Success set value to attributes");

            logger.LeaveMethod();
        }
 public StaffController(IStaffServices staffServices, IStaff staff, IDesigantionServices designationServices)
 {
     _Staff                = new Staff();
     _IStaff               = staff;
     _IStaffServices       = staffServices;
     _IDesigantionServices = designationServices;
 }
Esempio n. 4
0
 public ImprestController(UnisolAPIdbContext context, IStaffServices staffServices, IStudentServices studentServices)
 {
     _context         = context;
     _staffServices   = staffServices;
     _studentServices = studentServices;
     utils            = new Utils(context);
 }
Esempio n. 5
0
 public MemoController(IUnitOfWork unitOfWork, UnisolAPIdbContext context, IStaffServices staffServices,
                       IStudentServices studentServices)
 {
     _unitOfWork      = unitOfWork;
     _studentServices = studentServices;
     utils            = new Utils(context);
     _staffServices   = staffServices;
 }
Esempio n. 6
0
 public PNineController(UnisolAPIdbContext context, IConfiguration configuration, IStaffServices staffServices, IUnitOfWork unitOfWork)
 {
     _context       = context;
     _unitOfWork    = unitOfWork;
     _configuration = configuration;
     _staffServices = staffServices;
     staffUtilities = new StaffUtilities();
 }
 protected override void Dispose(bool isDisposing)
 {
     if (isDisposing)
     {
         _IDesigantionServices = null;
         _IStaff         = null;
         _IStaffServices = null;
     }
 }
Esempio n. 8
0
 public UsersController(UnisolAPIdbContext context, IStudentServices studentServices, ISystemServices systemServices,
                        IStaffServices staffServices)
 {
     _context           = context;
     _studentServices   = studentServices;
     _systemServices    = systemServices;
     _staffServices     = staffServices;
     studentCredentials = new StudentCredential(context, studentServices, systemServices);
 }
 public ReturnController(IReturnServices IssueService, IStudentServices studentService, IBookService bookservices, IReturn Issuemodel, IStaffServices staffSevices)
 {
     _entity           = new Return();
     _IReturnServices  = IssueService;
     _IStudentServices = studentService;
     _IBookService     = bookservices;
     _IReturn          = Issuemodel;
     _IStaffServices   = staffSevices;
 }
Esempio n. 10
0
 public CorridorController()
 {
     _corridorServices = new CorridorServices();
     _staffServices    = new StaffServices();
 }
 public StaffController(ILogger <StaffController> logger, IStaffServices service)
 {
     _logger  = logger;
     _service = service;
 }
Esempio n. 12
0
 public ClaimsController(UnisolAPIdbContext context, IStaffServices staffServices)
 {
     _context       = context;
     _staffServices = staffServices;
 }
 public StaffController()
 {
     _scheduleServices = new ScheduleServices();
     _staffServices    = new StaffServices();
 }
 public ScheduleServices()
 {
     _staffServices  = new StaffServices();
     _taskRepository = new TaskRepository();
     _kronox         = new kronox();
 }
Esempio n. 15
0
 public ProfileController(UnisolAPIdbContext context, IStaffServices staffServices, IStudentServices studentServices)
 {
     _context         = context;
     _staffServices   = staffServices;
     _studentServices = studentServices;
 }
Esempio n. 16
0
        public ReturnData <dynamic> GetPayslip(IStaffServices _staffServices, List <string> accountTypes, List <HrpPayAcc> indAccountsTypes, string userCode, string month)
        {
            var payslipViewModelList = new List <PayslipModelView>();
            var earningDeductions    = new EarningDeductions();
            var accountsWithAmount   = _staffServices.ReturnPayslipActiveColumns(userCode, month);

            if (!accountsWithAmount.AccountAmountViewModel.Any())
            {
                return new ReturnData <dynamic>
                       {
                           Success = false,
                           Message = "Oops,we could not find any pay slip for that periods",
                       }
            }
            ;

            foreach (var accType in accountTypes)
            {
                var payslipViewModel = new PayslipModelView
                {
                    AccountType = accType,
                    TotalAmount = 0.0
                };

                var indvidualAcTypes = indAccountsTypes
                                       .Where(a => a.Type == accType && accountsWithAmount.ActiveAccounts.Contains(a.Code)).ToList();

                if (indvidualAcTypes.Any())
                {
                    var individualAccountTypeList = new List <IndividualAccountType>();
                    indvidualAcTypes.ForEach(iA =>
                    {
                        var result = Convert.ToDouble(accountsWithAmount.AccountAmountViewModel
                                                      .FirstOrDefault(aA => aA.AccountName == iA.Code)
                                                      ?.Amount ?? "0.00");
                        if (result > 0)
                        {
                            payslipViewModel.TotalAmount += result;
                            if (CreateSumAmount(accType))
                            {
                                earningDeductions.Earnings += result;
                            }
                            else
                            {
                                earningDeductions.Deductions += result;
                            }

                            var individualAccountTypes = new IndividualAccountType
                            {
                                Name    = iA.Names,
                                Amount  = result,
                                Balance = _staffServices.GetBalance(accType, userCode, iA.Code, iA.Names, month).Data
                            };
                            individualAccountTypeList.Add(individualAccountTypes);
                        }
                    });

                    payslipViewModel.IndividualAccountType = individualAccountTypeList;
                    if (individualAccountTypeList.Any())
                    {
                        payslipViewModelList.Add(payslipViewModel);
                    }
                }
            }

            if (!payslipViewModelList.Any())
            {
                return new ReturnData <dynamic>
                       {
                           Success = false,
                           Message = "Oops,seems like we could find your payslip"
                       }
            }
            ;

            var sortedPayments = SortPaymentsPerDeductions(payslipViewModelList);
            var processings    = _staffServices.GetMonthProcessedSalary(userCode, month);

            return(new ReturnData <dynamic>
            {
                Success = true,
                Message = "",
                Data = new
                {
                    sortedPayments,
                    earningDeductions,
                    RDate = processings.Data?.RDate ?? DateTime.UtcNow
                }
            });
        }
Esempio n. 17
0
 public UserController()
 {
     _staffServices = new StaffServices();
 }
 public ScheduleController()
 {
     _kronox           = new kronox();
     _staffServices    = new StaffServices();
     _scheduleServices = new ScheduleServices();
 }
Esempio n. 19
0
 public IpPayslipController(UnisolAPIdbContext context, IConfiguration configuration, IStaffServices staffServices)
 {
     _context       = context;
     _configuration = configuration;
     _staffServices = staffServices;
 }
Esempio n. 20
0
 public StaffController(IStaffServices authService)
 {
     this._staffService = authService;
 }
Esempio n. 21
0
 public EClaimsController(IStaffServices staffServices)
 {
     _staffServices = staffServices;
 }
Esempio n. 22
0
 public LeaveController(UnisolAPIdbContext context, IStaffServices staffServices)
 {
     _context       = context;
     _staffServices = staffServices;
     utils          = new Utils(context);
 }