Exemplo n.º 1
0
 private void SendEmail(CashPaymentRequestStatus CPRS)
 {
     if (CPRS.Approver != 0)
     {
         if (GetSuperviser(CPRS.Approver).IsAssignedJob != true)
         {
             EmailSender.Send(GetSuperviser(CPRS.Approver).Email, "Cash Payment Request", (CurrentCashPaymentRequest.AppUser.FullName).ToUpper() + "Requests for Cash Payment with Request No. - '" + (CurrentCashPaymentRequest.RequestNo).ToUpper() + "'");
         }
         else
         {
             EmailSender.Send(GetSuperviser(_controller.GetAssignedJobbycurrentuser(CPRS.Approver).AssignedTo).Email, "Cash Payment Request", (CurrentCashPaymentRequest.AppUser.FullName).ToUpper() + " Requests for Cash Payment with Request No. - '" + (CurrentCashPaymentRequest.RequestNo).ToUpper() + "'");
         }
     }
     else
     {
         foreach (AppUser accountant in _settingController.GetAppUsersByEmployeePosition(CPRS.ApproverPosition))
         {
             if (accountant.IsAssignedJob != true)
             {
                 EmailSender.Send(accountant.Email, "Cash Payment Request", (CurrentCashPaymentRequest.AppUser.FullName).ToUpper() + " Requests for Cash Payment with Request No. - '" + (CurrentCashPaymentRequest.RequestNo).ToUpper() + "'");
             }
             else
             {
                 EmailSender.Send(GetSuperviser(_controller.GetAssignedJobbycurrentuser(accountant.Id).AssignedTo).Email, "Cash Payment Request", (CurrentCashPaymentRequest.AppUser.FullName).ToUpper() + " Requests for Cash Payment with Request No. - '" + (CurrentCashPaymentRequest.RequestNo).ToUpper() + "'");
             }
         }
     }
 }
 private void SendEmail(ExpenseLiquidationRequestStatus ELRS)
 {
     if (ELRS.Approver != 0)
     {
         if (GetSuperviser(ELRS.Approver).IsAssignedJob != true)
         {
             EmailSender.Send(GetSuperviser(ELRS.Approver).Email, "Expense Liquidation Request", (CurrentTravelAdvanceRequest.AppUser.FullName).ToUpper() + " Requests for Expense Liquidation for Travel Advance No. '" + (CurrentTravelAdvanceRequest.TravelAdvanceNo).ToUpper() + "'");
         }
         else
         {
             EmailSender.Send(GetSuperviser(_controller.GetAssignedJobbycurrentuser(ELRS.Approver).AssignedTo).Email, "Expense Liquidation Request", (CurrentTravelAdvanceRequest.AppUser.FullName).ToUpper() + " Requests for Expense Liquidation  for Travel Advance No. '" + (CurrentTravelAdvanceRequest.TravelAdvanceNo).ToUpper() + "'");
         }
     }
     else
     {
         foreach (AppUser accountant in _settingController.GetAppUsersByEmployeePosition(ELRS.ApproverPosition))
         {
             if (accountant.IsAssignedJob != true)
             {
                 EmailSender.Send(accountant.Email, "Expense Liquidation Request", (CurrentTravelAdvanceRequest.AppUser.FullName).ToUpper() + " Requests for Expense Liquidation for Travel Advance No. - '" + (CurrentTravelAdvanceRequest.TravelAdvanceNo).ToUpper() + "'");
             }
             else
             {
                 EmailSender.Send(GetSuperviser(_controller.GetAssignedJobbycurrentuser(accountant.Id).AssignedTo).Email, "Expense Liquidation Request", (CurrentTravelAdvanceRequest.AppUser.FullName).ToUpper() + " Requests for Expense Liquidation for Travel Advance No. - '" + (CurrentTravelAdvanceRequest.TravelAdvanceNo).ToUpper() + "'");
             }
         }
     }
 }
Exemplo n.º 3
0
 public IList <AppUser> GetAppUsersByEmployeePosition(int employeePosition)
 {
     return(_settingController.GetAppUsersByEmployeePosition(employeePosition));
 }