Exemplo n.º 1
0
        public JsonResultModel <IEnumerable <People> > AjaxGet()
        {
            List <People> peoples = new List <People>();
            People        p1      = new People();

            p1.Id   = 1;
            p1.name = "ly";
            People p2 = new People();

            p2.Id   = 2;
            p2.name = "lg";
            peoples.Add(p1);
            peoples.Add(p2);
            return(JsonResultModel <IEnumerable <People> > .ReturnSuccess(peoples));
        }
Exemplo n.º 2
0
        public JsonResultModel <List <UserInfo> > GetUser(int id)
        {
            UserInfo person = new UserInfo();

            person.bRes     = true;
            person.UserName = "******" + id;
            person.Password = "******";
            person.Ticket   = "lg123";
            List <UserInfo> list = new List <UserInfo>();

            list.Add(person);
            UserInfo person1 = new UserInfo();

            person1.bRes     = true;
            person1.UserName = "******";
            person1.Password = "******";
            person1.Ticket   = "lg123";
            list.Add(person1);
            return(JsonResultModel <List <UserInfo> > .ReturnSuccess(list));
        }