Exemplo n.º 1
0
        public JsonResult OpreateTask(string TaskName, string flag)
        {
            string msg    = string.Empty;
            bool   result = SchudeleInterface.TaskVaildOrInVaild(TaskName, flag, out msg);
            Dictionary <bool, string> resDic = new Dictionary <bool, string>();

            resDic.Add(result, msg);
            msg = JsonConvert.SerializeObject(resDic);
            return(Json(new { total = 1, rows = msg }));
        }
Exemplo n.º 2
0
        public JsonResult CreateTask(string TaskName, string TaskLoop, string StartTime,
                                     string TaskDesc, string ActionPath, string EndTime)
        {
            string msg    = "";
            string author = "bjx";
            bool   result = SchudeleInterface.CreateTask(TaskName, TaskDesc, author, ActionPath, StartTime, TaskLoop, EndTime, out msg);
            Dictionary <bool, string> resDic = new Dictionary <bool, string>();

            resDic.Add(result, msg);
            msg = JsonConvert.SerializeObject(resDic);
            return(Json(new { total = 1, rows = msg }));
        }
Exemplo n.º 3
0
        public JsonResult GetTaskList(string TaskName)
        {
            object o = new object();

            lock (o)
            {
                List <ScheduleTask> result = SchudeleInterface.GetAllTasks(TaskName);
                var total = result.Count;
                var rows  = result;
                return(Json(new { total = total, rows = rows }));
            }
        }