Exemplo n.º 1
0
        /// <summary>
        /// 查询所有房间类型(查询房间类型用到,带搜索)
        /// </summary>
        /// <returns></returns>
        public string GetAllRoomType(string message)
        {
            JSONHelper jsonHelp = new JSONHelper();

            jsonHelp.success = true;
            DataSet ds = rtd.GetAllRoomType(message);

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                jsonHelp.AddItem("TypeId", dr["TypeId"].ToString());
                jsonHelp.AddItem("TypeName", dr["TypeName"].ToString());
                jsonHelp.AddItem("TypePrice", dr["TypePrice"].ToString());
                jsonHelp.AddItem("IsTv", dr["IsTv"].ToString());
                jsonHelp.AddItem("IsKongTiao", dr["IsKongTiao"].ToString());
                jsonHelp.AddItem("Remark", dr["Remark"].ToString());
                jsonHelp.ItemOk();
            }
            string str = jsonHelp.ToString();

            return(str);
        }