Example #1
0
        public ActionResult NewEmployeeReminder()
        {
            //TempData["isvalid"] = true;
            EmployeeRemindersViewModel obj = new EmployeeRemindersViewModel();

            obj.Positions = ReminderService.GetPositions();
            obj.Employees = ReminderService.GetEmployees();
            obj.Groups    = ReminderService.GetGroups();

            return(View(obj));
        }
Example #2
0
        /// <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));
            }
        }
Example #3
0
        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));
            }
        }