Click here to Skip to main content
15,868,164 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi i need one help
i have one class which is ToolListClass.cs
inside the ToolListclass two more classes which one is ResultTool.cs and AIRNRCToolList.cs
in xamarin i am using a listview and i want to display these class data in listview .
showing my codes which i have tried

What I have tried:

  public class ToolListClass
    {
        public int PM_Id { get; set; }
        public int PM_OUID { get; set; }
        public string PM_OUID_Name { get; set; }
        public string PM_PartNo { get; set; }
        public string PM_PartDescription { get; set; }
        public string PM_HSNCode { get; set; }
        public string PM_PartType { get; set; }
        public string NRCStatus { get; set; }
        public string TaskStatus { get; set; }
    }

    public class ResultTool
    {
        public List<ToolListClass> List { get; set; }
        public object View_Tools { get; set; }
    }

    public class AIRNRCToolList
    {
        public object Token { get; set; }
        public string Status { get; set; }
        public int Error_Code { get; set; }
        public ResultTool Result { get; set; }
        public object ErrorMessage { get; set; }
        public object ID { get; set; }
    }
}



var httpClient = new HttpClient();
      //    var apiEndpoint = "https://devtitanapi.airworks.in/api/NRC/NRC_View_Part_List";
      //    Materials requestData = new Materials();
      //    requestData.PART_NO = txtPartNumber.Text;
      //    // requestData.NPD_OUID = Convert.ToInt32(txtID.Text);

      //    var requestDataJson = JsonConvert.SerializeObject(requestData);
      //    var requestContent = new StringContent(requestDataJson, Encoding.UTF8, "application/json");
      //    var response = await httpClient.PostAsync(apiEndpoint, requestContent);
      //    var responseContent = await response.Content.ReadAsStringAsync();
      //    var responseData = JsonConvert.DeserializeObject<List<Materials>>(responseContent);
      //     GetMaterialsList = new List<Materials>(responseData);

i want to fatch listdata and display into listview
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900