public ActionResult Index(string id) { if (Request.IsAuthenticated) { AuthenticateUser(); int idDecrypted = Security.DecryptId(Convert.ToString(id)); var opdExpenseService = _opdExpenseService.GetOpdExpensesAgainstId(Convert.ToInt32(idDecrypted)); ViewData["OPDTYPE"] = opdExpenseService.OpdType; ViewData["OPDEXPENSE_ID"] = idDecrypted; ImgViewModel model = new ImgViewModel { FileAttach = null, ImgLst = new List <OpdExpenseImageVM>() }; model.ImgLst = _opdExpenseImageService.GetOpdExpensesImageAgainstOpdExpenseId(Convert.ToInt32(idDecrypted)); model.OPDExpenseID = idDecrypted; return(this.View(model)); } else { return(RedirectToAction(UrlIndex, UrlHome)); } }
public void EmailSend(OpdExpenseVM OpdExpense) { var patients = _opdExpensePatientService.GetOpdExpensesPatientAgainstOpdExpenseId(OpdExpense.ID); OpdExpense.OpdExpensePatients = patients; var images = _opdExpenseImageService.GetOpdExpensesImageAgainstOpdExpenseId(OpdExpense.ID); OpdExpense.OpdExpenseImages = images; var message = EmailUtils.GetMailMessage(OpdExpense); _emailService.SendEmail(message); }
public static HospitalExpenseVM GetHospitalExpense(int Id, IOpdExpenseService _opdExpenseService, IOpdExpensePatientService _opdExpensePatientService, IOpdExpenseImageService _opdExpenseImageService) { OpdExpenseVM opdExpense = _opdExpenseService.GetOpdExpensesAgainstId(Id); var hospitalInformation = new HospitalExpenseVM() { OpdExpensePatients = _opdExpensePatientService.GetOpdExpensesPatientAgainstOpdExpenseId(Id), OpdExpenseImages = _opdExpenseImageService.GetOpdExpensesImageAgainstOpdExpenseId(Id), ID = opdExpense.ID, ClaimantSufferedIllness = opdExpense.ClaimantSufferedIllness, ClaimantSufferedIllnessDetails = opdExpense.ClaimantSufferedIllnessDetails, ClaimantSufferedIllnessDate = opdExpense.ClaimantSufferedIllnessDate, DateIllnessNoticed = opdExpense.DateIllnessNoticed, DateRecovery = opdExpense.DateRecovery, Diagnosis = opdExpense.Diagnosis, DoctorName = opdExpense.DoctorName, DrugsPrescribedBool = opdExpense.DrugsPrescribedBool, DrugsPrescribedDescription = opdExpense.DrugsPrescribedDescription, EmployeeDepartment = opdExpense.EmployeeDepartment, EmployeeName = opdExpense.EmployeeName, EmployeeEmailAddress = opdExpense.EmployeeEmailAddress, HospitalName = opdExpense.HospitalName, FinanceApproval = opdExpense.FinanceApproval, FinanceComment = opdExpense.FinanceComment, FinanceApprovalDate = opdExpense.FinanceApprovalDate, FinanceEmailAddress = opdExpense.FinanceEmailAddress, FinanceName = opdExpense.FinanceName, HrApproval = opdExpense.HrApproval, HrComment = opdExpense.HrComment, HrName = opdExpense.HrName, HrApprovalDate = opdExpense.HrApprovalDate, HrEmailAddress = opdExpense.HrEmailAddress, ManagementApproval = opdExpense.ManagementApproval, ManagementComment = opdExpense.ManagementComment, ManagementName = opdExpense.ManagementName, ManagementApprovalDate = opdExpense.ManagementApprovalDate, ManagementEmailAddress = opdExpense.ManagementEmailAddress, PeriodConfinementDateFrom = opdExpense.PeriodConfinementDateFrom, PeriodConfinementDateTo = opdExpense.PeriodConfinementDateTo, Status = opdExpense.Status, OpdType = opdExpense.OpdType, TotalAmountClaimed = opdExpense.TotalAmountClaimed, TotalAmountApproved = opdExpense.TotalAmountApproved, ClaimYear = opdExpense.ClaimYear, ClaimMonth = opdExpense.ClaimMonth, CreatedDate = opdExpense.CreatedDate, ModifiedDate = opdExpense.ModifiedDate, PhysicalDocumentReceived = opdExpense.PhysicalDocumentReceived, PayRollMonth = opdExpense.PayRollMonth, ExpenseNumber = opdExpense.ExpenseNumber, OpdEncrypted = opdExpense.OpdEncrypted, HospitalizationType = opdExpense.HospitalizationType, MaternityType = opdExpense.MaternityType }; return(hospitalInformation); }