Exemple #1
0
        public Dictionary <string, object> CreateTask(Dictionary <string, object> d)
        {
            Dictionary <string, object> r = new Dictionary <string, object>();

            try
            {
                string b = db.CreateTask(d);
                if (b == "")
                {
                    r["code"]    = 2000;
                    r["message"] = "成功";
                }
                else
                {
                    r["code"]    = -1;
                    r["message"] = b;
                }
            }
            catch (Exception e)
            {
                r["message"] = e.Message;
                r["code"]    = -1;
            }
            return(r);
        }