Пример #1
0
        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);
        }
Пример #2
0
 partial void UpdatePreUser(PreUser instance);
Пример #3
0
 partial void DeletePreUser(PreUser instance);
Пример #4
0
 partial void InsertPreUser(PreUser instance);