Exemplo n.º 1
0
        public void Login()
        {
            YinZiLoginModel yinZiLoginModel = YinZiLoginModel.CreateRandom("cc");
            StringContent   stringContent   = new StringContent(yinZiLoginModel.ToJson());

            stringContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");
            string result = base.Post("login", stringContent);
        }
Exemplo n.º 2
0
            public static YinZiLoginModel CreateRandom(string companyCode)
            {
                YinZiLoginModel yinZiLoginModel = new YinZiLoginModel();

                yinZiLoginModel.CompanyCode = companyCode;
                yinZiLoginModel.UserName    = "******";
                yinZiLoginModel.Password    = random.Next(0, int.MaxValue).ToString();
                return(yinZiLoginModel);
            }