webservlce 的各个属性

[WebMethod(Description = "我是可见的", MessageName = "GetAboutIntroduction")]//有这个标志的函数代表可以在客户端调用         public string GetAboutIntroduction()         {             Hashtable hb = new Hashtable();             try             {                 string sql = "SELECT ID,ABOUTTEXT,ADDTIME FROM ABOUT";                 DataSet ds = MySqlHelper.GetDataSet(MySqlHelper.Conn, CommandType.Text, sql, null);                 if (ds.Tables[0] != null)                 {                     if (ds.Tables[0].Rows.Count != 0)                     {

hb.Add("manage", ds.Tables[0].Rows[0][1].ToString());                     }                 }                 else                 {

hb.Add("manage", "");                 }                 hb.Add("result", "1");             }             catch (Exception ex)             {                 hb.Add("result", "0");                 hb.Add("manage", ex.Message);             }             return Newtonsoft.Json.JsonConvert.SerializeObject(hb);         }     }

上一篇:利用GeneratedKeyHolder获得新增数据主键值


下一篇:rest-framework之响应器(渲染器)