Example #1
0
        public Hashtable Put(int id, string content)
        {
            int       admin = UserInfo.GetUserIdFromCookie(HttpContext.Current);
            Hashtable ht    = new Hashtable();
            WorkInfo  ai    = new WorkInfo();
            Hashtable data  = new Hashtable();

            try
            {
                // ht.Add("state", ai.AddOne(id, name, birthday, admin, work));
                if (ai.ChangeContent(id, content))
                {
                    ht.Add("code", 20000);
                    data.Add("id", id);
                }
                else
                {
                    ht.Add("code", 40000);
                    data.Add("message", "error");
                }
            }
            catch (Exception e)
            {
                ht.Add("code", 40000);
                data.Add("message", e.Message);
            }
            ht.Add("data", data);
            return(ht);
        }