| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329 |
-
- using Newtonsoft.Json.Linq;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace NEducation.Code
- {
- public class UserProfile : PostObj
- {
- public String id { get; set; }
- public String usersId { get; set; }
- public String users { get; set; }
- //public String serviceid { get; set; }
- public String fullName { get; set; }
- public String sex { get; set; }
- public String address { get; set; }
- public String provinceId { get; set; }
- public String cardNumber { get; set; }
- public String email { get; set; }
- public String company { get; set; }
- public String description { get; set; }
- public String picture { get; set; }
- public String sexNeed { get; set; }
- public String birthday { get; set; }
- public String birthday_day { get; set; }
- public String birthday_month { get; set; }
- public String birthday_year { get; set; }
- public String height { get; set; }
- public String weight { get; set; }
- public String work { get; set; }
- public String isLike { get; set; }
- public String totalLike { get; set; }
- public String totalPic { get; set; }
- public String totalView { get; set; }
- public String lookingFor { get; set; }
- public List<Interest> listInterests { get; set; }
- public String interests { get; set; }
- public UserProfile() { }
- public UserProfile(string json) : this(JObject.Parse(json))
- { }
- public UserProfile(JObject jObject)
- {
- if (jObject != null)
- {
- id = (string)jObject["id"];
- usersId = (string)jObject["usersId"];
- users = (string)jObject["users"];
- //serviceid = (string)jObject["serviceid"];
- fullName = (string)jObject["fullName"];
- sex = (string)jObject["sex"];
- address = (string)jObject["address"];
- provinceId = (string)jObject["provinceId"];
- cardNumber = (string)jObject["cardNumber"];
- email = (string)jObject["email"];
- company = (string)jObject["company"];
- description = (string)jObject["description"];
- picture = (string)jObject["picture"];
- sexNeed = (string)jObject["sexNeed"];
- birthday = (string)jObject["birthday"];
- if (birthday != null && birthday != "")
- {
- birthday_day = birthday.Substring(0, 2);
- birthday_month = birthday.Substring(3, 2);
- birthday_year = birthday.Substring(6);
- }
- height = (string)jObject["height"];
- weight = (string)jObject["weight"];
- work = (string)jObject["work"];
- isLike = (string)jObject["isLike"];
- totalLike = (string)jObject["totalLike"];
- totalPic = (string)jObject["totalPic"];
- totalView = (string)jObject["totalView"];
- lookingFor = (string)jObject["lookingFor"];
- var list = jObject["listInterests"];
- if (list != null && list.HasValues)
- {
- listInterests = new List<Interest>();
- JArray a = (JArray)list;
- foreach (JObject o in a.Children<JObject>())
- {
- listInterests.Add(new Interest(o));
- }
- }
- }
- }
- }
- public class GetUserProfileReq : PostObj
- {
- public string usersQuery { get; set; }
- public string users { get; set; }
- //public string serviceid { get; set; }
- }
- public class UpdateViewReq : PostObj
- {
- public string users { get; set; }
- public string users_receved { get; set; }
- //public string serviceid { get; set; }
- }
- public class Interest
- {
- public String id { get; set; }
- public String code { get; set; }
- public String name { get; set; }
- public String picture { get; set; }
- public Interest() { }
- public Interest(JObject jObject)
- {
- if (jObject != null)
- {
- id = (string)jObject["id"];
- code = (string)jObject["code"];
- name = (string)jObject["name"];
- picture = (string)jObject["picture"];
- }
- }
- }
- public class GetListInterestReq : PostObj
- {
- public string language { get; set; }
- }
- public class GetListInterestRes
- {
- public string status { get; set; }
- public string message { get; set; }
- public List<Interest> listInterests { get; set; }
- public GetListInterestRes() { }
- public GetListInterestRes(string json)
- {
- JObject jObject = JObject.Parse(json);
- if (jObject != null)
- {
- status = (string)jObject["status"];
- message = (string)jObject["message"];
- var list = jObject["listInterests"];
- if (status == "0")
- {
- listInterests = new List<Interest>();
- JArray a = (JArray)list;
- foreach (JObject o in a.Children<JObject>())
- {
- listInterests.Add(new Interest(o));
- }
- }
- }
- }
- }
- public class UpdateInterestReq : PostObj
- {
- public String users { get; set; }
- //public String serviceId { get; set; }
- public String listInterests { get; set; }
- public UpdateInterestReq() { }
- public UpdateInterestReq(string json)
- {
- JObject jObject = JObject.Parse(json);
- if (jObject != null)
- {
- users = (string)jObject["users"];
- //serviceid = (string)jObject["serviceId"];
- listInterests = (string)jObject["listInterests"];
- }
- }
- }
- public class WsRes
- {
- public String status { get; set; }
- public String message { get; set; }
- public WsRes() { }
- public WsRes(string json)
- {
- JObject jObject = JObject.Parse(json);
- if (jObject != null)
- {
- status = (string)jObject["status"];
- message = (string)jObject["message"];
- }
- }
- }
- public class WsConfirmRes
- {
- public String status { get; set; }
- public String message { get; set; }
- public String requestId { get; set; }
- public WsConfirmRes() { }
- public WsConfirmRes(string json)
- {
- JObject jObject = JObject.Parse(json);
- if (jObject != null)
- {
- status = (string)jObject["status"];
- message = (string)jObject["message"];
- requestId = (string)jObject["requestId"];
- }
- }
- }
- public class SearchProfileReq : PostObj
- {
- public string users { get; set; }
- //public string serviceid { get; set; }
- public string proviceId { get; set; }
- public string fromAge { get; set; }
- public string toAge { get; set; }
- public string rowsOnPage { get; set; }
- public string seqPage { get; set; }
- public string language { get; set; }
- public string isLike { get; set; }
- public SearchProfileReq()
- {
- seqPage = "1";
- rowsOnPage = "12";
- }
- }
- public class SearchProfileRes
- {
- public String status { get; set; }
- public String message { get; set; }
- public String rowsOnPage { get; set; }
- public String seqPage { get; set; }
- public String totalPage { get; set; }
- public List<UserProfile> listProfile { get; set; }
- public SearchProfileRes() { }
- public SearchProfileRes(string json)
- {
- JObject jObject = JObject.Parse(json);
- if (jObject != null)
- {
- status = (string)jObject["status"];
- message = (string)jObject["message"];
- rowsOnPage = (string)jObject["rowsOnPage"];
- seqPage = (string)jObject["seqPage"];
- totalPage = (string)jObject["totalPage"];
- var list = jObject["listProfile"];
- if (status == "0")
- {
- listProfile = new List<UserProfile>();
- JArray a = (JArray)list;
- foreach (JObject o in a.Children<JObject>())
- {
- listProfile.Add(new UserProfile(o));
- }
- }
- }
- }
- }
- public class LikeUpdateReq : PostObj
- {
- //"users":"50912345678","serviceId":"30","usersLike":"509123456789","isLike":"1"
- public string users { get; set; }
- public string usersLike { get; set; }
- public string isLike { get; set; }
- }
- public class GetListLikeReq : PostObj
- {
- public String users { get; set; }
- public String type { get; set; }
- public String rowsOnPage { get; set; }
- public String seqPage { get; set; }
- public String language { get; set; }
- public GetListLikeReq() { }
- public GetListLikeReq(String users)
- {
- this.users = users;
- this.rowsOnPage = "12";
- }
- }
- public class GetListLikeRes
- {
- public String status { get; set; }
- public String message { get; set; }
- public String rowsOnPage { get; set; }
- public String seqPage { get; set; }
- public String totalPage { get; set; }
- public List<UserProfile> listProfile { get; set; }
- public GetListLikeRes() { }
- public GetListLikeRes(string json)
- {
- JObject jObject = JObject.Parse(json);
- if (jObject != null)
- {
- status = (string)jObject["status"];
- message = (string)jObject["message"];
- rowsOnPage = (string)jObject["rowsOnPage"];
- seqPage = (string)jObject["seqPage"];
- totalPage = (string)jObject["totalPage"];
- var list = jObject["listProfile"];
- if (list != null && list.HasValues)
- {
- listProfile = new List<UserProfile>();
- JArray a = (JArray)list;
- foreach (JObject o in a.Children<JObject>())
- {
- listProfile.Add(new UserProfile(o));
- }
- }
- }
- }
- }
- }
|