Esempio n. 1
0
        public ActionResult Action(int? id, string option, string items, string curtab)
        {
            var tasks = new TaskModel();
            tasks.CurTab = curtab;
            var a = items.SplitStr(",").Select(i => i.ToInt());

            if (option.StartsWith("M"))
            {
                var ToTab = option.Substring(1).ToInt();
                if (curtab == "t" + ToTab)
                    return new EmptyResult();
                tasks.MoveTasksToList(a, ToTab);
            }
            else if (option == "deletelist")
            {
                tasks.DeleteList(curtab);
                return PartialView("TabsOptionsRows", tasks);
            }
            else if (option == "delete")
                tasks.DeleteTasks(a);
            else if (option.StartsWith("P"))
                tasks.Priortize(a, option);
            else if (option == "archive")
                tasks.ArchiveTasks(a);

            return PartialView("Rows", tasks);
        }