Beispiel #1
0
        public JsonResult CompleteTopic()
        {
            var topicid = Request.Form["topicid"];

            CoTopicVM.UpdateTopicStatus(topicid, TopicStatus.Done);
            TopicProject.updateeventstatus(topicid, TopicPJStatus.Done);
            var ret = new JsonResult();

            ret.Data = new { sucess = true };
            return(ret);
        }
Beispiel #2
0
        public JsonResult MoveEventList()
        {
            UserAuth();
            var eventid = Request.Form["eventid"];

            TopicProject.updateeventstatusByEventID(eventid, ViewBag.username);
            var res = new JsonResult();

            res.Data = new { success = true };
            res.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(res);
        }
Beispiel #3
0
        public JsonResult NewTopicEvent()
        {
            var topicid   = Request.Form["topicid"];
            var events    = Request.Form["eventcontents"];
            var eventlist = (List <string>)Newtonsoft.Json.JsonConvert.DeserializeObject(events, (new List <string>()).GetType());

            TopicProject.UpdateTopicPJ(topicid, eventlist, this);

            var ret = new JsonResult();

            ret.Data = new { sucess = true };
            return(ret);
        }
Beispiel #4
0
        public JsonResult InitEventList(string topicid)
        {
            var WorkingList = new List <object>();
            var DoneList    = new List <object>();

            var workinglist = TopicProject.RetrieveTopicPJ(topicid, TopicPJStatus.Working);
            var donelist    = TopicProject.RetrieveTopicPJ(topicid, TopicPJStatus.Done);

            foreach (var item in workinglist)
            {
                WorkingList.Add(
                    new
                {
                    id      = item.eventid,
                    title   = item.project,
                    dueDate = ""
                }
                    );
            }

            foreach (var item in donelist)
            {
                DoneList.Add(
                    new
                {
                    id      = item.eventid,
                    title   = item.project,
                    dueDate = ""
                }
                    );
            }

            var alleventlist = new List <object>();

            alleventlist.Add(
                new
            {
                id            = "todolistid",
                title         = "TodoList",
                defaultStyle  = "lobilist-warning",
                controls      = false,
                useCheckboxes = false,
                items         = WorkingList
            }
                );
            alleventlist.Add(
                new
            {
                id            = "donelistid",
                title         = "Done",
                defaultStyle  = "lobilist-success",
                controls      = false,
                useCheckboxes = false,
                items         = DoneList
            }
                );

            var res = new JsonResult();

            res.Data = new { lists = alleventlist };
            res.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            return(res);
        }