private string preuser2str(string firstName, string limitWord, string limitType, string gender, bool haslimit) { PreUser preUser = new PreUser(); if (haslimit) { preUser.limitWord = limitWord; preUser.limitType = limitType; } else { //单字查询 preUser.single = "single"; } preUser.firstName = firstName; preUser.gender = gender; /* * DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(PreUser)); * System.IO.MemoryStream ms = new MemoryStream(); * serializer.WriteObject(ms, preUser); * System.IO.StreamReader reader = new StreamReader(ms); * ms.Position = 0; * string jsonData = reader.ReadToEnd(); * reader.Close(); * ms.Close(); */ string jsonData = JsonUtil.SerializeObject(preUser); return(jsonData); }
partial void UpdatePreUser(PreUser instance);
partial void DeletePreUser(PreUser instance);
partial void InsertPreUser(PreUser instance);