Beispiel #1
0
        public ActionResult SendReminderEmail(int?id)
        {
            int    result  = -1;
            string message = string.Empty;

            if (id.HasValue)
            {
                var model = new DueDateModel(id.Value, null);
                if (model.UserHasAccess())
                {
                    message = model.EmailReminder();
                    if (string.IsNullOrWhiteSpace(message))
                    {
                        result = 1;
                    }
                }
            }

            var data = new
            {
                Result  = result,
                Message = message
            };

            return(Json(data));
        }
Beispiel #2
0
        public ActionResult SetDueDate(DueDateModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            model.Save();
            if (model.AltLocation.HasValue && model.AltLocation.Value)
            {
                return(RedirectToAction("Index", "Artifact", new { id = model.SortMainId }));
            }
            return(RedirectToAction("Index", "Home"));
        }
Beispiel #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id">Sort Main Id</param>
        /// <param name="alt">Return Location</param>
        /// <returns></returns>
        public ActionResult SetDueDate(int?id, bool?alt)
        {
            if (!id.HasValue)
            {
                return(RedirectToAction("Index", "Home"));
            }

            var model = new DueDateModel(id.Value, alt);

            if (!model.UserHasAccess())
            {
                if (alt.HasValue && alt.Value)
                {
                    return(RedirectToAction("Index", "Artifact", new { id }));
                }
                return(RedirectToAction("Index", "Home"));
            }

            return(View(model));
        }