سلام
خسته نباشید. ما از طریق JSON اطلاعاتمون رو دریافت میکنیم ولی اطلاعات contect و video رو میده ولی بقیه رو NULL میده حالا مشکل ما کجاست اگه ممکنه کمک کنید
اینم کدمون
public class InfoMaps
{
public int id { get; set; }
public string code { get; set; }
public string name { get; set; }
public string type { get; set; }
public int createdate { get; set; }
public int expiredate { get; set; }
public string active { get; set; }
public string parent { get; set; }
public int ownerid { get; set; }
public string lat { get; set; }
public string lng { get; set; }
public int catid { get; set; }
public string address { get; set; }
public int stat { get; set; }
public string followers { get; set; }
public object wgcode { get; set; }
public object city { get; set; }
public object state { get; set; }
public object country { get; set; }
}
public class Contacts
{
public int id { get; set; }
public int jobid { get; set; }
public string phone { get; set; }
public string mobile { get; set; }
public object email { get; set; }
public object web { get; set; }
}
public class Img
{
public int id { get; set; }
public string name { get; set; }
public string ownerid { get; set; }
public string jobid { get; set; }
public string address { get; set; }
}
public class Item
{
public int id { get; set; }
public string name { get; set; }
public string link { get; set; }
public int price { get; set; }
public string ownerid { get; set; }
public string jobid { get; set; }
public string img { get; set; }
public string imgaddress { get; set; }
}
public class SearchedJobList
{
public InfoMaps mapinfo { get; set; }
public Contacts contacts { get; set; }
public string qrcode { get; set; }
public object logo { get; set; }
public string video { get; set; }
public IList<Img> imgs { get; set; }
public IList<Item> items { get; set; }
public string comment { get; set; }
public object cover { get; set; }
public object workhours { get; set; }
}
ممنون از راهنماییهاتون
لطفا برای درج کد از کلید کد در ادیتور استفاده کنید
کدهاتون قابل خوندن نیست
public class InfoMaps { public int id { get; set; } public string code { get; set; } public string name { get; set; } public string type { get; set; } public int createdate { get; set; } public int expiredate { get; set; } public string active { get; set; } public string parent { get; set; } public int ownerid { get; set; } public string lat { get; set; } public string lng { get; set; } public int catid { get; set; } public string address { get; set; } public int stat { get; set; } public string followers { get; set; } public object wgcode { get; set; } public object city { get; set; } public object state { get; set; } public object country { get; set; } } public class Contacts { public int id { get; set; } public int jobid { get; set; } public string phone { get; set; } public string mobile { get; set; } public object email { get; set; } public object web { get; set; } } public class Img { public int id { get; set; } public string name { get; set; } public string ownerid { get; set; } public string jobid { get; set; } public string address { get; set; } } public class Item { public int id { get; set; } public string name { get; set; } public string link { get; set; } public int price { get; set; } public string ownerid { get; set; } public string jobid { get; set; } public string img { get; set; } public string imgaddress { get; set; } } public class SearchedJobList { public InfoMaps mapinfo { get; set; } public Contacts contacts { get; set; } public string qrcode { get; set; } public object logo { get; set; } public string video { get; set; } public IList<Img> imgs { get; set; } public IList<Item> items { get; set; } public string comment { get; set; } public object cover { get; set; } public object workhours { get; set; } }
اینها فقط تعاریف Complex ها هستند
باید کدهاتون رو قرار بدید تا مشکل بررسی بشه
public App2.Model.InfoJobs.SearchedJobList InfoJob(string Code) { System.Net.WebClient client = new System.Net.WebClient(); client.Encoding = Encoding.UTF8; string path = string.Format("http://edux.ir/app/?mod=view&username={0}&password={1}&code={2}", Username, Password, Code); var response = client.DownloadString(path); var tmpLists = Newtonsoft.Json.JsonConvert.DeserializeObject<Model.InfoJobs.SearchedJobList>(response); return tmpLists; }
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)