/// <summary> /// show reminder details of type employee /// </summary> /// <param name="id">selected reminder id</param> /// <returns>method employeeremindergetbyid call</returns> public ViewResult Details(int id) { var type = ReminderService.GetType(id); if (type == LookupService.GetLookupIdByCode((int)Lookups.employee)) { EmployeeRemindersViewModel obj = new EmployeeRemindersViewModel(); obj = ReminderService.EmployeeRemindersGetByID(id); obj.Positions = ReminderService.GetPositions(); return(View("Details", obj)); } else { GeneralRemindersViewModel obj = new GeneralRemindersViewModel(); obj = ReminderService.generalRemindersGetByID(id); return(View("GeneralDetails", obj)); } }
public ActionResult Update(int id) { var type = ReminderService.GetType(id); if (type == LookupService.GetLookupIdByCode((int)Lookups.employee)) { EmployeeRemindersViewModel obj = new EmployeeRemindersViewModel(); obj = ReminderService.EmployeeRemindersGetByID(id); obj.Positions = ReminderService.GetPositions(); obj.Employees = ReminderService.GetEmployees(); obj.Groups = ReminderService.GetGroups(); return(View("EmployeeReminderUpdate", obj)); } else { GeneralRemindersViewModel obj = new GeneralRemindersViewModel(); obj = ReminderService.generalRemindersGetByID(id); obj.Groups = ReminderService.GetGroups(); return(View("GeneralReminderUpdate", obj)); } }